πŸ“Š JavaScript
Q. What does Rhino do when the getter and setter methods exist?
  • (A) It becomes JavaScript properties
  • (B) Java classes are used to avoid them
  • (C) Java classes & JavaScript properties
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) It becomes JavaScript properties

Explanation: Rhino allows JavaScript code to query and set the static fields of Java classes and the instance fields of Java objects. Java classes often avoid defining public fields in favor of getter and setter methods. When getter and setter methods exist, Rhino exposes them as JavaScript properties.

Explanation by: Mr. Dubey
Rhino allows JavaScript code to query and set the static fields of Java classes and the instance fields of Java objects. Java classes often avoid defining public fields in favor of getter and setter methods. When getter and setter methods exist, Rhino exposes them as JavaScript properties.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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