Assume we want to write an if statement that will perform an action if a jeroo named martha has a flower. Which of the following is the correct syntax for that? For this question don't worry about the placement of curly braces.

if (martha.hasFlower())
  • if martha.hasFlower()
  • if (martha.hasFlower());
  • else (martha.hasFlower)

Remember there isn't a special behavior we want to do if there isn't a flower ahead of the jeroo so an else would not be a good choice here!