Flow control is a basic Java feature but it can be tricky too. Do you think you can get the following Java Challenge right?
If you want to watch the FULL video explanation check it out at the following link:
Keep breaking you limits and doing your best!
The default boolean value in java is false. Therefore ishomerfat default value is false when we check the first condition it has to fail I think. You said that we set the ishomerfat variable to true. How is that?. We are checking the condition in the first if condition block. We are not assigning the ishomerfat value to true. Correct me if I am wrong.
isHomerFat = true is not a comparison, but an assignment, so after that isHomerFat will be true. In Java an assignment have a return value, so the if statment evaluates it as true.