Professional Documents
Culture Documents
Date:
Module: J2SE
Session No. 1
Q. No. 1
A. 42 42
B. 43 43
C. 42 -43
D. 42 43
Q. No. 2
A. 3 1 6
B. 2 2 3
C. 2 3 4
D. 3 3 6
Session No. 2
Q. No. 3
Which function is used to perform some action when the object is to be destroyed?
A. finalize()
B. delete()
C. main()
Q. No. 4
Session No. 3
Q. No. 5
Which operator is used by Java run time implementations to free the memory of an
object when it is no longer needed?
A. Delete
B. free
C. new
Session No. 4
Q. No. 7
Q. No. 8
Which error will be thrown when JVM cant allocate memory to object?
A. java.lang.OutOfMemoryError
B. java.lang.LinkageError
C. java.lang.StackOverflowError
D. java.lang.UnknownError
Session No. 5
Q. No. 9
Which of the following statements declare class Sample to belong to the
payroll.admindept package?
B. import payroll.*
C. package payroll.admindept.Sample;
D. package payroll.admindept;
Q. No. 10
Which of these is used to access member of class before object of that class is created?
A. public
B. private
C. static
D. protected
Session No. 6
Q. No. 11
Q. No. 12
Session No. 7
Q. No. 13
A. Compilation fail
B. IllegalThreadStateException occurs
C. IllegalAccessException occurs
Q. No. 14
Session No. 8
Q. No. 15
Q. No. 16
A. Map
B. Enumeration
C. HashMap
D. Hashtable
Q. No. 17
A. Serializable,Cloneable,Runnable
B. Cloneable,Comparable,Runnable
C. Serializable,Bubble,Runnable
D. Serializable, Serializer,Cloneable
Q. No. 18
Which statement is true about Compact Profiles?
A. Compact Profiles are used for minimizing space requirements of Java runtime.
B. Compact Profiles does not minimize space requirements of the application.
C. In java 8 we have to always configure full JRE APIs which includes all the Java SE
classes.
D. All of Above
Session No. 10
Q. No. 19
Q. No. 20
Session No. 11
Q. No. 21
Q. No. 22
Which of these standard collection classes implements a linked list data structure?
A. AbstractList
B. LinkedList
C. HashSet
D. AbstractSet
Session No. 12
Q. No. 23
Q. No. 24
A. IPaddress of Server
B. Port number
C. Both 1 & 2
D. None of the above
Session No. 13
Q. No. 25
Which of these is a class ,uses String as a key to store the value in object?
A. Array
B. ArrayList
C. Dictionary
D. Properties
Q. No. 26
{ });
run(){}};
Q. No. 27
Which function of pre defined class Thread is used to check whether current
thread is still running?
A. isAlive()
B. Join()
C. isRunning()
D. Alive()
Q. No. 28
Q. No. 29
The_______ and_____ classes are abstract classes that support reading and writing
of byte streams.
A. reader, writer
B. inputstream, outputstream
C. objectinputstream, objectoutputstream
D. None
Q. No. 30
The ActionListener interface is used for handling action
events,Forexample,it's used by
A. JButton
B. JCheckbox
C. JMenuItem
D. All of these
Q. No. 31
Which is default layout manager for JFrame?
A. Flow Layout
B. Grid Layout
C. Border Layout
D. Card Layout
Q. No. 32
Which of these values is returned by read() method is end of file (EOF) is encountered?
A. 0
B. 1
C. -1
D. null
Session No. 17
Q. No. 33
A. Java
B. System
C. java/system
D. /java/system
Q. No. 35
Q. No. 36
What is the process of defining a method in subclass having same name & type signature as a
method in its superclass?
a) Method overloading
b) Method overriding
c) Method hiding
d) None of the mentioned
Q. No. 37
Q. No. 38
Q. No. 39
Which of these method of class StringBuffer is used to concatenate the string representation to
the end of invoking string?
a) concat()
b) append()
c) join()
d) concatenate()
Q. No. 40
Q. No. 41
Q. No. 42
Q. No. 43
Q. No. 44
Which of the following is a method having same name as that of its class?
a) finalize
b) delete
c) class
d) constructor
Q. No. 45
Which function is used to perform some action when the object is to be destroyed?
a) finalize()
b) delete()
c) main()
d) None of the mentioned
Q. No. 46
Q. No. 47
Q. No. 48
Q. No. 49
Q. No. 50
Which of these is a method of ObjectInput interface used to deserialize an object from a stream?
a) int read()
b) void close()
c) Object readObject()
d) Object WriteObject()