Java concepts and its programming MCQs

80 MCQs  — Computer Programming MCQs  (Page 5 of 8)

Executable applet is_________________?
A. .class file
B. .java file
C. .java html
D. .applet file
String is the predefined ?
A. Object
B. Variable
C. Class
D. Method
The following fraction of code double STATIC = 2.5 ; System.out.println( STATIC ); ?
A. Prints 2.5
B. Raises an exception
C. Raises an error as static is used as a variable which is a keyword
D. None of these
Which statements are most accurate regarding the following classes? class A{private int i; protected int j; } class B extends A{ private int k; protected int m; } ?
A. An object of b contains data fields j, k, m
B. An object of b contains data fields k, m
C. An object of b contains data fields j, m
D. An object of b contains data fields i, j, k, m
pow () is associated with which class ?
A. Input stream class
B. Object class
C. Math class
D. None of above
Which method is used to perform DML statements in JDBC ?
A. Executeupdate()
B. Executequery()
C. Execute()
D. None of above
A package is a collection of__________________?
A. Classes and interfaces
B. Classes
C. Editing tools
D. Editing tools and interfaces