Which of the following option leads to the portability and security of Java?
1. Bytecode is executed by JVM
2. The applet makes the Java code secure and portable
3. Use of exception handling
4. Dynamic binding between objects
In java jar stands for_____.
1. Java Archive Runner
2. Java Application Resource
3. Java Application Runner
4. None of the above
In which memory a String is stored when we create a string using new operator?
1. Stack
2. String memory
3. Heap memory
4. Random storage space
What is the return type of the hashCode() method in the Object class?
1.Object
2.int
3.long
4.void
Which method of the Class.class is used to determine the name of a class represented by the class object as a String?
1. getClass()
2. intern()
3. getName()
4. toString()
Which of the following creates a List of 3 visible items and multiple selections abled?
1. new List(false 3)
2. new List(3 true)
3. new List(true 3)
4. new List(3 false)
Which of the following is a marker interface?
1. Runnable interface
2. Remote interface
3. Readable interface
4. Result interface
Which of the following is a valid long literal?
1.ABH8097
2.L990023
3.904423
4.0xnf029L
Which of the following is false?
1. The rt.jar stands for the runtime jar
2. It is an optional jar file
3. It contains all the compiled class files
4. All the classes available in rt.jar is known to the JVM
Which of the following is not a Java features?
1. Dynamic
2. Architecture Neutral
3. Use of pointers
4.Object-oriented
Which of these classes are the direct subclasses of the Throwable class?
1. RuntimeException and Error class
2. Exception and VirtualMachineError class
3. Error and Exception class
4. IOException and VirtualMachineError class
Which package contains the Random class?
1.java.util package
2.java.lang package
3.java.awt package
4.java.io package
_____ is used to find and fix bugs in the Java programs.
1.JVM
2.JRE
3.JDK
4.JDB
An interface with no fields or methods is known as a ______.
1. Runnable Interface
2.Marker Interface
3.Abstract Interface
4. CharSequence Interface
Evaluate the following Java expression if x=3 y=5 and z=10: ++z + y - y + z + x++
1.24
2.23
3.20
4.25
Given that Student is a class how many reference variables and objects are created by the following code? Student studentName studentId; studentName = new Student(); Student stud_class = new Student();
1.Three reference variables and two objects are created.
2. Two reference variables and two objects are created.
3. One reference variable and two objects are created.
4. Three reference variables and three objects are created.
In which process a local variable has the same name as one of the instance variables?
1. Serialization
2. Variable Shadowing
3. Abstraction
4. Multi-threading
The u0021 article referred to as a
1. Unicode escape sequence
2. Octal escape
3. Hexadecimal
4. Line feed
What do you mean by chained exceptions in Java?
1. Exceptions occurred by the VirtualMachineError
2. An exception caused by other exceptions
3. Exceptions occur in chains with discarding the debugging information
4. None of the above
What do you mean by nameless objects?
1. An object created by using the new keyword.
2. An object of a superclass created in the subclass.
3. An object without having any name but having a reference.
4. An object that has no reference.
What does the expression float a = 35 / 0 return?
1.0
2. Not a Number
3. Infinity
4. Run time exception
What is the use of the intern() method?
1. It returns the existing string from memory
2. It creates a new string in the database
3. It modifies the existing string in the database
4. None of the above
What is the use of w in regex?
1. Used for a whitespace character
2. Used for a non-whitespace character
3. Used for a word character
4. Used for a non-word character
Which keyword is used for accessing the features of a package?
1.package
2.import
3.extends
4.Export
Which of the following for loop declaration is not valid?
1. for ( int i = 99; i >= 0; i / 9 )
2. for ( int i = 7; i <= 77; i += 7 )
3. for ( int i = 20; i >= 2; - -i )
4. for ( int i = 2; i <= 20; i = 2* i )
Which of the following is a reserved keyword in Java?
1. object
2. strictfp
3. main
4.system
Which of the following is an immediate subclass of the Panel class?
1. Applet class
2. Window class
3. Frame class
4. Dialog class
Which of the following tool is used to generate API documentation in HTML format from doc comments in source code?
1. javap tool
2. javaw command
3. Javadoc tool
4. javah command
Which of the given methods are of Object class?
1. notify() wait( long msecs ) and synchronized()
2. wait( long msecs ) interrupt() and notifyAll()
3. notify() notifyAll() and wait()
4. sleep( long msecs ) wait() and notify()
Which option is false about the final keyword?.
1. A final method cannot be overridden in its subclasses.
2. A final class cannot be extended.
3. A final class cannot extend other classes
4. A final method can be inherited.