Logo

Java Questions Set 250:

Quiz Mode

Polymorphism types in Java is/are

1
2
3
4

Solution:

What is the output of the following Java program?

1
2
3

Solution:

Which of the following is not a core interface of Hibernate?

1
2
3
4

Solution:

Which of this method of class StringBuilder  is used to extract a substring from string object

1
2
3
4

Solution:

In scoping, anything initialized outside the block

1
2
3
4

Solution:

//Topic:- Type Casting

class abekus {

public static void main (String[] args) {

long mylong=5;

 double mydouble= mylong;

 System.out.println(mydouble);

}

}

1
2
3
4

Solution:

Which of the following methods is correct for defining a generic class?

1
2
3
4

Solution:

What is the output of the following Java code?

class Abekusmain {

public static void main(String args[]) {

System.out.println(30*12 + "Abekus");

System.out.println("Abekus" + 30*12);

}

}

1
2
3
4

Solution:

What will be the output of the following Java code?

class Output

{

public static void main(String args[])

{

String s1 = "Hello";

String s2 = new String(s1);

String s3 = "HELLO";

System.out.println(s1.equals(s2) + " " + s1.equalsIgnoreCase(s3));

}

}

1
2
3
4

Solution:

Which of the following are advantages of packages in Java?

1
2
3
4

Solution: