1.

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) It act as javascript function

Answer» The correct option is (a) It becomes JavaScript properties

The best I can explain: 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

No Comment Found

Related InterviewSolutions