Which of these is NOT a valid form of method reference?

  1. ClassName::staticMethodName
  2. ClassName::instanceMethodName
  3. objectName::instanceMethodName
  4. ClassName::fieldName
Correct answer ClassName::fieldName

Explanation

Method references only apply to methods and constructors, not directly to fields.

Update: Admin added a tag on this question

Topics

By Admin · · 18 views