Join Now
Home Aptitude Reasoning DI VA GK CA CA Hindi Quiz Placements
try
catch
finally
handle
What is the output of the following code?
public class Test { public static void main(String args[]) { int x = 10; int y = 20; System.out.println(x < y && x > 5); } }
1
0
if
while
switch
string
class
new
object
create
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
None of the above
public class Test { public static void main(String args[]) { System.out.println("Hello" + " World"); }
Hello
World
Hello World
HelloWorld
Implementing the Runnable interface
Extending the Thread class
Calling the start() method on a Thread object
Creating a new instance of the Thread class
for
public
private
protected
static
public class Test { public static void main(String args[]) { int x = 10; if(x > 5 && x < 15) { System.out.println("x is between 5 and 15"); } else { System.out.println("x is not between 5 and 15"); } } }
x is between 5 and 15
x is not between 5 and 15
5 and 15
No output