Multiple choice

Which of the following is called ''NoSuchFieldException' in java?

  1. This exception is thrown when a program tries to reference, on a class or object, a field that does not exist.

  2. This exception is thrown when a program tries to reference, on a class or object, a method that does not exist.

  3. This exception is thrown when a program attempts to access a field or method which is not accessible from the location where the reference is made.

  4. This exception is thrown when an invalid value is passed to a string-to-number conversion method.

  5. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

This is known as NoSuchFieldException.