LATEST

Tuesday, April 28, 2020

JAVA MCQS PART 05

JAVA MCQS PART 05

1.  When a JavaScript object is sent to Java, the runtime engine creates a Java wrapper of type ___________
A.  ScriptObject           
B.  JSObject         
C.  JavaObject         
D.  Jobject
Ans: B

2.  _______ class provides an interface for invoking JavaScript methods and examining JavaScript properties.
A.  ScriptObject         
B.  JSObject        
C.  JavaObject          
D.  Jobject
 Ans: B

3.  _________ is a wrapped Java array, accessed from within JavaScript code.
A.  JavaArray          
B.   JavaClass     
C.  JavaObject        
D.  JavaPackage
 Ans:  A
  
4. A ________ object is a reference to one of the classes in a Java package, such as netscape.javascript .
A.  JavaArray       
B.  JavaClass          
C.  JavaObject         
D.  JavaPackage
 Ans: B

5.  The JavaScript exception is available to the Java code as an instance of __________
A.  netscape.javascript.JSObject      
B.  netscape.javascript.JSException
C.  netscape.plugin.JSException          
D.  None of the above
Ans: B

6. To automatically open the console when a JavaScript error occurs which of the following is added to prefs.js?
A.  user_pref(" javascript.console.open_on_error", false);
B.  user_pref("javascript.console.open_error ", true);
C.  user_pref("javascript.console.open_error ", false);
D.  user_pref("javascript.console.open_on_error", true);
Ans: D

7.  To open a dialog box each time an error occurs, which of the following is added to prefs.js?
A.  user_pref("javascript.classic.error_alerts", true);
B.  user_pref("javascript.classic.error_alerts ", false);
C.  user_pref("javascript.console.open_on_error ", true);
D.  user_pref("javascript.console.open_on_error ", false);
 Ans: A

8.  The syntax of a blur method in a button object is ______________
A.  Blur()         
B.   Blur(contrast)      
C.  Blur(value)       
D.  Blur(depth)
 Ans: A

9.  The syntax of capture events method for document object is ______________
A.  captureEvents()         
B.   captureEvents(argseventType)
C.  captureEvents(eventType)     
D.  captureEvents(eventVal)
 Ans: C

10.  The syntax of close method for document object is ______________
A.  Close(doC.         
B.   Close(object)  
C.  Close(val)       
D.  Close()
Ans: D

No comments:

Post a Comment