You are on page 1of 2

NAME:

1. Which of the following is not a method of the Thread class.


A. public void run() B. public void start() C. public void exit() D. public final
int getPriority()
2. Which will legally declare, construct, and initialize an array?
A. int [] myList = {"1", "2", "3"};
C. int myList [] [] = {4,9,7,0};
7};

B. int [] myList = (5, 8, 2);


D. int myList [] = {4, 3,

3.Which one of these lists contains only Java programming language keywords?
A. class, if, void, long, Int, continue
finally, default, throws
C. try, virtual, throw, final, volatile, transient
implements, do
E. byte, break, assert, switch, include.

B. goto, instanceof, native,


D. strictfp, constant, super,

4. Which is a reserved word in the Java programming language?


A. method
reference E. array

B. native

C. subclasses

D.

5. Which is a valid keyword in java?


A. Interface
unsigned

B. String

C. Float

D.

6. Which is the valid declarations within an interface definition?


A. public double methoda();
methoda();
C. static void methoda(double d1);
methoda(double d1);

B. public final double


D. protected void

7. Which is a valid declarations of a String?


A. String s1 = null;
C.String s3 = (String) 'abc';
'\ufeed';

B. String s2 = 'null';
D. String s4 = (String)

8. What is the numerical range of a char?


A. -128 to 127
65535

B. -(215) to (215) 1

C. 0 to 32767

D. 0 to

9. Java programs are


A) Faster than others
C) Not reusable

B) Platform independent
D) Not scalable

10. Java has its origin in


A) C programming language
C) COBOL
language

B) PERRL
D) Oak programming

You might also like