1) The methods wait() and notify() are defined in
A. java.lang.String
B. java.lang.Runnable
C. java.lang.Object
D. java.lang.Thread
2) The data or variables, defined within a class are called ..... variables.
A. object
B. class
C. instance
D. schema
3) When we implement the Runnable interface, we must define the method.
A. start()
B. init()
C. run()
D. resume()
4) ........ class must give a concrete method.
A. abstract
B. constructor
C. least
D. program
5) Which exception is thrown by the read() method of input stream class?
A. Exception
B. FileNotFoundException
C. ReadException
D. IOException
6) When a method calls itself, it is called ......
A. recursion
B. distance
C. display
D. problem
7) Which of the following statements are true?
i) An abstract class may not have any final methods.
ii) A final class may not have any abstract methods
iii) An inner class may be declared with any accessibility keyword
iv) Transient variable must be static
A. i and ii
B. ii and iii
C. iii and iv
D. All i, ii, iii and iv
8) Which of the following statements is/are false?
A. A java monitor must either extend thread or implement runnable
B. The sleep() method should be enclosed in try .... catch block.
C. A thread can be temporarily suspended from running by using the wait() method.
D. A suspended thread using suspend() method can be received using the resume() method.
9) What does J2SE mean?
A. Java 2 Platform Standard Edition
B. Java 2 Internet Standard Edition
C. Java 2 System Edition
D. Java 2 Platform Independent Standard Edition
10) An ........ is a special kind of Java program that is designed to be transmitted over the Internet.
A. viewlet
B. applet
C. servlet
D. object
11) Which are the valid ways to create DataInptStream streams?
A. new DataInputStream();
B. new DataInputStream("in.dat', "r");
C. new DataInputStream(new File("in.dat"));
D. new DataInputStream(new FileInputStream("in.dat");
12) finalize() is only called just prior to .....
A. initialization
B. runtime
C. garbage collection
D. destruction
13) When we invoke repaint() for a component, the AWT invokes the method
A. draw()
B. show()
C. update()
D. paint()
14) What is the use of valueOf() method?
A. It converts data from its internal format into a human-readable form.
B. It converts integer value to string
C. It converts string to int value
D. It converts string to float value
15) What is the default thread at the time of starting the program?
A. Main thread
B. Thread Group
C. Child Thread
D. Thread Pool
16) What does the following line of code do?
TextField text= new TextField(10);
A. Creates text object that can hold 10 rows of text
B. Creates text object that can hold 10 columns of text
C. Creates the object text and initialize it with the value 10
D. The code is illegal
17) .......... is an applet tag.
A. (applet)
B. >applet<
C.