peek() returns the next item in line
Which of the following is not a state of an object in Hibernate?
Which AWT component can contain other components like buttons, text fields, and labels?
public class operators {
public static void main(String[] args)
{
int x = 5, y = 8;
System.out.println(+x + y);
}
}
How can we restrict certain variables of a class from getting serialized?
How many times 'abekus' is printed?
public class abekus
{
public static void main(String[] args) {
do{
System.out.println("abekus");
}while(false);
}
}
Predict the output of the following Java code.
import java.util.*;
public class Abekus {
public static void main(String[] args) {
LinkedList l = new LinkedList();
l.add(6);
l.add(8);
l.add(4);
l.add(2);
System.out.println(l.poll());
System.out.println(l);
}
}
Predict the output of the following Java code:
public class Abekus {
public static void main(String[] args)
{
Integer a = 128, b = 128;
Integer c = -130, d = -130;
Integer e = 122, f = 122;
Integer g = -127, h = -127;
System.out.println((a==b) + " " + (c==d) + " ");
System.out.println((e==f) + " " + (g==h));
}
}
Select the correct option for this Java code.
class Abekus {
public static void main(String[] args)
{
int a = 15;
final int b = 34;
int c = 45;
switch (a) {
case 15:
System.out.println("Hi, "); //line 1
break;
case b:
System.out.println("Abekus "); //line 2
break;
case c:
System.out.println("Learner"); //line 3
break;
}
}
}