Logo

Java Questions Set 261:

Quiz Mode

Dynamic allocation of object id done by using ____keyword.



Solution:

What will be the output of the following code?

1
2
3
4

Solution:

In java String is a 

1
2
3
4

Solution:

Which of the following keywords is not part of exception handling in Java?

1
2
3
4

Solution:

Which type of variables is not supported in Java?

1
2
3
4

Solution:

public class operators {

public static void main(String[] args)

{

int a = 20, b = 10, c = 0, d = 20, e = 40, f = 30;

System.out.println((b + d - f));

}

}

Solution:

What will be the output of the following Java program if we run it using the command java Outer$Inner?

1
2
3
4

Solution:

Predict the output of the following Java code:

import java.util.Scanner;

public class Main

{

public static void main(String args[])

{

String s = "Abekus";

System.out.println(s.toUpperCase().length());

}

}

1
2
3
4

Solution:

Predict the output of the following Java code.

class Abekus {

public static void main(String[] args)

{

String[] str = { "Abekus", " is a ", " good platform for practice." };

System.out.println(str.length);

System.out.println(str[0].length());

}

}

1
2
3
4

Solution: