You read the following statement in a Java program that compiles and executes.

submarine.dive(depth);

What can you say for sure?

  1. depth must be an int

  2. dive must be a method.

  3. dive must be the name of an instance field.

  4. submarine must be the name of a class

  5. submarine must be a method.


Correct Option: B

Find more quizzes: