1.
To run a Java ____, you must use either a Web browser or an applet
viewer.
A. 
B. 
C. 
D. 
2.
Consider the following program.
public class HelloWorld
{
public static void main(String[] args)
{
System.out.print("Hello World ")
}
} The missing semicolon in the code above
will be caught by the ____.
A. 
B. 
C. 
D. 
3.
Which of the following is a reserved word in Java?
A. 
B. 
C. 
D. 
4.
Which package is automatically imported by the Java system?
A. 
B. 
C. 
D. 
5.
It represents or models things in the real world.
A. 
B. 
C. 
D. 
6.
It is an event, usually some form of error which happens during the normal course of program
execution.
A. 
B. 
C. 
D. 
7.
It is a classification of objects which can’t be touched but do exist.
A. 
B. 
C. 
D. 
8.
Which of the following statements describe the key aspects about the syntax of the try-catch-finally
blocks?
I. The block notation is mandatory.
II. For each try block, there can be one or more catch blocks, but at most only one finally block.
III. A try block must be followed by atleast one catch block or one finally block.
IV. Each catch block can define one or more exception handle.
V. The exception must be of the Throwable class or one of its subclasses.
A. 
B. 
C. 
D. 
9.
It refers to the hiding of attributes and methods within an object.
A. 
B. 
C. 
D. 
10.
Which of the following are NOT an example of a Physical object?I. Person II. Course
III. Teacher
IV. Department
V. Professor
A. 
B. 
C. 
D. 
11.
This method of Graphics object is useful for drawing pie-shaped pieces of a circle or oval.
A. 
B. 
C. 
D. 
12.
Which of the following is the method of ActionListener interface?
A. 
Public void actionPerformed(ActionEvent e)
B. 
Public void actionPerformed( )
C. 
ActionPerformed(ActionEvent e)
D. 
Public static void actionPerformed( )
13.
It is the keyword in Java used for instance methods or constructor to refer to the object on which thecurrently executing method has been invoked.
A. 
B. 
C. 
D. 
14.
Which of the following is NOT a method of MouseListener interface?
A. 
B. 
C. 
D. 
15.
It is a layout manager which divides a rectangular screen area into five regions.
A. 
B. 
C. 
D. 
16.
It is the keyword used for implementing an interface.
A. 
B. 
C. 
D. 
17.
It is an access modifier that specifies that class members are accessible to anyone, both inside outside of the class.
A. 
B. 
C. 
D. 
18.
It is the process by which an operating system allocates processor time to each running thread.
A. 
B. 
C. 
D. 
19.
It is a type of method that is used to write or change the value of a member field.
A. 
B. 
C. 
D. 
20.
Which of the following is the correct signature of method drawString()?
A. 
B. 
DrawString(String str, int x, int y)
C. 
DrawString(int x, Sting str, int y)
D. 
DrawString(int x, int y, String str)
21.
Which of the following will generate an
error:
A. 
A drawRect method with 4 parameters.
B. 
A fillArc method with 6 parameters.
C. 
A fillRoundRect method with 4 parameters
D. 
A fillRect method with 4 parameters
22.
A window that is moved or covered is
__________.
A. 
B. 
C. 
D. 
23.
The distance values for drawRect are
________.
A. 
B. 
C. 
D. 
24.
To change the color for your drawings, you
have to use ______ method.
A. 
B. 
C. 
D. 
25.
Which of the following is NOT a subclass of
class Component
A. 
B. 
C. 
D. 
26.
It prepares your applet to accept event
messages.
A. 
B. 
C. 
D. 
27.
You can provide animations in java by
combining different methods of drawing and using _______
A. 
B. 
C. 
D. 
28.
It is an interface class that aligns your
components so that they neither crowd each other nor overlap
A. 
B. 
C. 
D. 
29.
which of the following is NOT a type of
layout:
A. 
B. 
C. 
D. 
30.
The GridLayout constructor takes 4
arguments and these are
A. 
B. 
C. 
D. 
31.
A communication from the outside world to
the program that something has occurred
A. 
B. 
C. 
D. 
32.
This method means that the mouse leaves the
component area.
A. 
B. 
C. 
D. 
33.
What is another name for a base class?
A. 
B. 
C. 
D. 
34.
It
is a method used by the Thread object to pause for a specified number of
milliseconds.
A. 
B. 
C. 
D. 
35.
These are serious errors
in the Java runtime system
A. 
B. 
C. 
D. 
36.
Threads
with the same priority are called _________.
A. 
B. 
C. 
D. 
37.
Which of the following is the
correct declaration of drawing a rectangle method?
A. 
B. 
C. 
D. 
38.
Which of the following statements is true?
A. 
Errors are more serious than Exceptions
B. 
Exceptions are more serious than Errors
C. 
Errors and Exceptions are equally serious
D. 
Exceptions and errors are same thing
39.
The file method canWrite returns a
_________value.
A. 
B. 
C. 
D. 
40.
When you perform an input operation in a java
program, you use a ___________.
A. 
B. 
C. 
D. 
41.
The _________class “knows” how to change colors and draw things on the
screen.
A. 
B. 
C. 
D. 
42.
What type of exception will you use if your
program attempt to divide a value to zero?
A. 
B. 
C. 
D. 
43.
What type of exception will you use if you are
trying to access a non-existing index?
A. 
B. 
StringIndexOutOfBoundsException
C. 
ArrayIndexOutOfBoundsException
D. 
44.
The following are the different constructors
that can be used to create File object except?
A. 
A. File(String directoryPath)
B. 
B. File(String directoryPath, String filename)
C. 
C. File(File dirPath, String filename)
D. 
D. File(File dirObj, String filename)
45.
The character streams are used to transfer _______
of characters.
A. 
B. 
C. 
D. 
46.
____ are pieces of information that are sent into, or passed to, a
method, usually because the method requires the information to perform its task
or carry out its purpose.
A. 
B. 
C. 
D. 
47.
A state of a thread that might be blocked, waiting
indefinitely, or waiting for a specified time
A. 
B. 
C. 
D. 
48.
It acts as a
gatekeeper, ensuring that only one thread at a time has access to data.
A. 
B. 
C. 
D. 
49.
Labels and Buttons are
__________.
A. 
B. 
C. 
D. 
50.
A program that allows you to
display HTML documents on your computer screen is a ____________.
A. 
B. 
C. 
D.