Predict the output of the following Java code:
Which of the following can operate on boolean variables
1. &&
2. ==
3. ?:
4. +=
Choose the correct methods that return the proxy object in Hibernate?
Protected modifier be accessed within the package and outside the package but through inheritance only
Which Java collection interface provides the capability to store objects using a key-value pair?
what should be the output of this code block?
public class abekus {
public static void main(String[] args) {
String input = " ";
System.out.println("-" + input.trim() + "-");
}
}
How many times 'abekus' is printed?
public class abekus
{
public static void main(String[] args) {
while(true);{
System.out.println("abekus");
}
}
}
public class testcase{
static int x[];
static{
x[0]=1;
}
public static void main (String []args) {
}
}
import java.util.*;
class output
{
public static void main(String args[])
{
LinkedList set = new LinkedList();
set.add(new Integer(3));
set.add(new Integer(8));
set.add(new Integer(5));
set.add(new Integer(1));
set.addFirst(new Integer(2));
set.addLast(new Integer(9));
Iterator i = set.iterator();
Collections.reverse(set);
Collections.shuffle(set);
System.out.println(set.peekFirst()+" "+set.pollLast());
}
}