Java Questions Paper
Java Questions Paper
Java Questions Paper
COMPUTING
Advanced Computing Training School
A: abstract class
B: parent class
C: Final class
D: None of above
method
B:
native
C:
subclasses
Page 1
reference
Question: 5 What is the stored in the object obj in following lines of code?
box obj;
A:
B:
NULL
C:
D:
Garbage
Question: 6 What is the process of defining more than one method in a class
differentiated by method signature?
A:
Function overriding
B:
Function overloading
C:
Function doubling
D:
Question: 7 Which of the following is a method having same name as that of its
class?
A:
finalize
B:
delete
C:
class
D:
constructor
main method
B:
finalize method
C:
static method
D:
private method
Page 2
display()
B:
print()
C:
drawString()
D:
transient()
public member
B:
private member
C:
protected member
D:
static member
Page 3
Public
B:
Protected
C:
No Modifier
D:
Question: 15 Which of these access specifiers must be used for main() method?
A:
private
B:
public
C:
protected
D:
try
B:
finally
C:
thrown
D:
catch
try
Page 4
finally
C:
throw
D:
catch
try
B:
finally
C:
throw
D:
catch
Math
Page 5
Process
C:
System
D:
Object
Question: 22 If method have same name as class name and method dont
AbstractList
B:
LinkedList
C:
ArrayList
D:
AbstractSet
Question: 24 Which of these methods can be used to obtain a static array from an
ArrayList object?
a) Array()
b) covertArray()
c) toArray()
d) covertoArray()
Page 6
Page 7
View Answer
Question: 31 Which of these method of Thread class is used to find out the
priority given to a thread?
a) get()
b) ThreadPriority()
c) getPriority()
d) getThreadPriority()
Question: 32 Which function of pre defined class Thread is used to check weather
current thread being checked is still running?
a) isAlive()
b) Join()
c) isRunning()
d) Alive()
Question: 33 Which of these interface is implemented by Thread class?
a) Runnable
DASDM Term End Examination
Page 8
Page 9
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
B:
SetDefaultCloseOperation(jFrame.EXIT_ON_CLOSE)
C:
setDefaultCloseOperation()
D:
none
Question: 41 which one method is used to set the visibility of the frame?
A:
setVisible(true).
B:
setVisible(false).
C:
setVisible()
D:
none.
getDisplayLanguage()
B:
GetdisplayLanguage()
C:
GetDisplayLanguage().
D:
none.
Question: 43 which one method used to set the state of the frame ?
A:
setExtendedState()
B:
SetExtendedState()
none
D:
Question: 44 Which of these packages contains all the event handling interfaces?
a) java.lang
b) java.awt
c) java.awt.event
d) java.event
Question: 45 Which of these interfaces handles the event when a component is
added to a container?
a) ComponentListener
b) ContainerListener
c) FocusListener
d) InputListener
Question: 46 Which of these functions is called to display the output of an applet?
a) display()
b) print()
c) displayApplet()
d) PrintApplet()