Which of these can not be declared static.
What is the name of the thread in the output of the following Java program?
What is the output of the following Java code?
What is the widest valid returnType for methodA in line 3?
public class ReturnIt
{
returnType methodA(byte x, double y) /* Line 3 */
{
return (long)x / y * 2;
}
}
Which of the following statements about the 'throws' keyword is false?
What is inter-thread communication in Java?
What is the PreparedStatement interface in Java?
Which one is not a feature of local inner class?
import java.util.*;
class output
{
public static void main(String args[])
{
LinkedList set = new LinkedList();
set.add("A");
set.add("B");
set.add("C");
set.add("D");
set.addFirst("F");
set.addLast("G");
Iterator i = set.iterator();
Collections.reverse(set);
Collections.shuffle(set);
System.out.println(set.getFirst()+" "+set.pollFirst()+" "+set.peekLast());
System.out.println(set.peekFirst()+" "+set.pollLast());
}
}