The underlined options are the correct answers. Read and learn!
rnQ1. What is garbage collection in the context of Java?
rn1. The JVM checks the output of any Java program and deletes anything that doesn’t make sense.
rn2. Any package imported in a program and not used is automatically deleted.
rn3. The operating system periodically deletes all of the java files available on the system.
rn4. When all references to an object are gone, the memory used by the object is automatically reclaimed.
rnQ2. Which class cannot be sub classed (or extended) in java?
rn1. Parent class
rn2. Final class
rn3. Abstract class
rn4. None of these
rnQ3. Which package is used for creating and implementing applets?
rn1. java.util
rn2. java.applet
rn3. java.awt
rn4. java.lang
rnQ4. __________ Variables and methods can be called without using the objects.
rn1. Abstract
rn2. None of these
rn3. Final
rn4. Static
rnQ5. Runnable is?
rn1. Variable
rn2. Class
rn3. Interface
rn4. Method
rnQ6.____________ are utilized to control the access to an object especially in multi-threaded programming
rn1. Synchronized methods
rn2. Serialized methods
rn3. Asynchronized methods
rn4. None
rnQ7. In Runnable, many threads share the same object instance. True or False?
rn1. Can’t be determined
rn2. True
rn3. Always false
rn4. False but not always
rnQ8.__________ is a special method in java that enables an object to initialize itself when it is created.
rn1. Constructor
rn2. Final
rn3. Destructor
rn4. Static
rnQ9.If method have same name as class name and method don’t have any return type then it is known as
rn1. Constructor
rn2. Object
rn3. Variable
rn4. Destructors
rnQ10.Decrement operator, –, decreases value of variable by what number?
rn1. 3
rn2. 4
rn3. 2
rn4. 1