Prints: false
Runtime error: NullPointerException
Compilation error: cannot find the symbol
Compilation error: v is not initialised inside the constructor
Prints: true
Rate this question:
Writable interface
Readable interface
ObjectSerializable interface
Cloneable interface
Serializable interface
Rate this question:
System.out.println(iOther);
System.out.println(iam);
System.out.println(iArgs);
System.out.println(s);
Synchronized
Final
Public
Protected
Private
Rate this question:
0 1 2 3 4 5
Indefinite Loop
1 2 3 4 5
0 1 2 3 4
0 1 2 3 4 0 1 2 3 4
Rate this question:
NO
True
Compile-time error
Runtime Error
False
Rate this question:
CallableStatement
PreparedStatement
ResultSet
Statement
Connection
Rate this question:
Compilation error "ut2.run() is never reached"
The code compiles and runs 3 non ending non daemon threads
The code compiles but runs only 1 non ending, non daemon thread
Runtime Error "IllegalThreadStateException"
Rate this question:
LinkedHashSet
TreeSet
Hashtable
SortedSet
HashSet
Rate this question:
Class: Real Chocos Private Limited Objects: Chocolate
Class: Chocolate Objects: Fruit Chocolates, Rum Chocolates, Milk Chocolates
Class: Choclate Objects: Milk Chocolates
Class: Fruit Chocolates Objects: Rum Chocolates
Rate this question:
Return this.name.equalsIgnoreCase(a.name);
Return this.name.equals(a.name);
Return super.equals(a);
Return this.name == a.name;
Return this.name.hashCode() == a.name.hashCode();
Rate this question:
Throws ClassCastException at runtime
Prints: B
Compilation Error 'Cannot find the symbol'
Prints: A
Rate this question:
An exception is thrown at runtime
Planet!
The code runs with no output
Welcome!
Compilation fails
Rate this question:
Program compiles successfully and prints the passed arguments as comma separated values and finally prints the length of the arguments-list
Runtime Error: NoSuchMethodError
Variable arguments cannot be used with enhanced for-loop
Compilation Error: var-args cannot be used as arguments for main() method
Rate this question:
Compile-time error
Prints: 13
Run-time error
Prints: 4
None of the listed options
Rate this question:
Is a meta-tag used to pass message between the code and JVM.
Defines the structure of an interface
Defines the structure of an Application
Defines the structure of an Object
Defines the structure of an Annotation
Rate this question:
It improves performance
The numeric key is unique
It is a 32 bit numeric digest key
HashCode() is defined in String class
HashCode() value cannot be a zero-value
Rate this question:
The compiler would object to line 2.
A runtime ClassCastException would be generated in line 2.
As this referes to the BaseWidget, a parent can accept itschild
After line 6 executes, the object referred to as A will in factbe a TypeAWidget.
Rate this question:
Run-time error
Compile-time error
Prints "Main Thread interrupted."
Program ends without printing anything
Prints "Run executed" twice
Rate this question:
JAR Files
Java Virtual Machine (JVM)
Java Development Kit (JDK)
Java Class Files
Java Source Files
Rate this question:
Inheriting from a class which is already in an inheritancehierarchy
Inheriting from more than one super class
Inheriting from two super classes
Inheriting from a single class
Rate this question:
List
SortedSet
Set
ArrayList
TreeSet
Rate this question:
'capacity' property indicates the maximum number ofcharacters that a StringBuffer can have
StringBuffer is extended from String class
StringBuffer implements Charsequence interface
StringBuffer is threadsafe
Buffer space in StringBuffer can be shared
Rate this question:
The class is fully encapsulated
The setCardInformation method breaks encapsulation
The code demonstrates polymorphism
The cardID and limit variables break polymorphism
The ownerName variable breaks encapsulation
Rate this question:
Public void add(C c1, C c2) { c1.getValue(); }
Public void add(A a, B b) { a.getValue(); }
Public void add(B b) { b.getValue(); }
Public void add(A a) { a.getValue(); }
Public void add(C c) { c.getValue(); }
Rate this question:
Runtime error
File not found exception caught
Compile time error. Since exceptions should be caught inreversed hierarchy order
Exception handled successfully
File not found exception caughtException handled successfully
Rate this question:
@Retention
@Deprecated
@Override
@SuppressWarnings
@Target
Rate this question:
Methods to retrieve disk usage information
Methods to set or query file permissions
Methods to attach the file to an email
Methods to encrypt the file with password
No new methods are introduced in JDK 1.6
Rate this question:
If(g==3) break rg;if(h==0) break dg;
If(h > 3) break dg;if(g > 0) break rg;
If(h==3) break rg;if(g==0) break dg;
If(h > 3) break dg;if(g > 0) break dg;
Public class Circle extends Shape {private int radius;public void setRadius(int radius) { this.radius = radius; }public int getRadius() { return radius; }public void draw() {/* code here */}}
Public class Circle implements Shape {private int radius;}
Public class Circle extends Shape {public int radius;private void draw() {/* code here */}}
Public abstract class Circle extends Shape {private int radius;}
Public class Circle extends Shape {private int radius;public void draw();}
Rate this question:
False true
True true
True false
Runtime error
False false
Rate this question:
System.out.setOut(new PrintStream("C:/Data"));
System.out.redirectOutput(new PrintStream("C:/Data"));
System.redirectOutput(new PrintStream("C:/Data"));
System.setOut(new PrintStream("C:/Data"));
System.setOut(new FileWriter("C:/Data"));
Rate this question:
Type II driver
Type III driver
Type I driver
Type IV driver
Rate this question:
The Student class should implement Comparable interface.
The Student class should implement Cloneable interface
The Student class should implement Serializable interface
The Student class should implement Comparator interface.
The Student class should implement Externalizable interface
Rate this question:
Lines: 4, 6
Lines: 4, 6, 8
None of the object is eligible for Garbage Collection
Lines: 6, 8
Lines: 8
Rate this question:
The catch block can have another try-catch-finally block
In a try-catch-finally structure, finally block and catch blockcan be placed in any order
On using nested try-catch blocks, only the outer most trycatchblock can have the finally block
The finally block can have another try-catch-finally blocknested inside
Rate this question:
None of the listed options
Exception Handler Run method ends here Main method ends here
Run method ends here Exception Handler Main method ends here
Main method ends here Run method ends here Exception Handler
Main method ends here Exception Handler Run method ends here
Rate this question:
Prints: 12.3
Prints: -2.0
Prints: 10.3
Prints: 0.0
Rate this question:
Both Statement A and B are true
Statement A is false and Statement B is true
Statement A is true and Statement B is false
Both Statement A and B are false
Rate this question:
Size: 63
Size: 33
Size: 66
Compilation error
Size: 36
Rate this question:
Compilation error at line 6
Compilation error at line 5
Compilation error at line 14
No compilation error but throws RuntimeException on running the code
Compilation error at line 10
Rate this question:
The inner interface I should be removed and kept outside the Bean class
The inner class BeanI should be declared as abstract
The outer class Bean should be declared as abstract
Add the following method to Bean class public void beanInterface() { }
The inner class should be removed and kept outside the Bean class
Rate this question:
Runtime Error
This is not the output
This is the output
This is the required output
Compile-time error
Rate this question:
Quiz Review Timeline (Updated): Mar 21, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.