Join Now
Home Aptitude Reasoning DI VA GK CA CA Hindi Quiz Placements
Single
Multiple
Hierarchical
Hybrid
int
boolean
double
string
MyClass object = new MyClass();
MyClass object = MyClass();
MyClass object;
MyClass object = null;
What is the output of the following code?
public class Test { public static void main(String args[]) { int x = 5; int y = 2; System.out.println(x / y); } }
2
2.5
None of the above
What is the output of the following program?
public class Test {public static void main(String args[]) {int x = 10;int y = x++;System.out.println(y); }}
10
11
9
public
private
protected
static
public class Test { public static void main(String args[]) { String name = "Java"; System.out.println(name.substring(1, 3)); } }
Ja
av
Jav
No output
public class Test { public static void main(String args[]) { int x = 10; int y = 5; int z = x + y; System.out.println("The sum of " + x + " and " + y + " is " + z); } }
The sum of 10 and 5 is 15
The sum of x and y is z
The sum of x and y is 15
Implementing the Runnable interface
Extending the Thread class
Calling the start() method on a Thread object
Creating a new instance of the Thread class
try
catch
finally
handle