Q. Which method reference form would match `Function<String, Integer> length = String::length;`?

  • (A) Instance method of a specific object
  • (B) Instance method of an arbitrary object of a particular type
  • (C) Static method reference
  • (D) Constructor reference
πŸ’¬ Discuss
βœ… Correct Answer: (B) Instance method of an arbitrary object of a particular type
Explanation: `String::length` is an instance method of an arbitrary `String` object.
Explanation by: Mr. Dubey
`String::length` is an instance method of an arbitrary `String` object.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
60
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
82%
Success Rate