Which of the following keywords are used to define a lower bounded wildcard?
Which Java package contains all the event handling interfaces?
public class operators {
public static void main(String[] args)
{
int a = 20, b = 10, c = 0;
a = b++ + c;
System.out.println(a);
}
}
Which of the following is not true?
What are the uses of the final keyword in Java?
Predict the output of the following Java program:
class Abekusparent {}
class Abekuschild extends Abekusparent {
public static void main(String args[]) {
Abekusparent a = new Abekuschild();
System.out.println(a instanceof Abekuschild);
}
}
Find the output of the following Java code:
class Abekus {
public static void main(String[] args)
{
char ch[][] = { { 'a', 'b', 'g' }, { 'c', 'd', 'e', 'f' } };
for (int i = 0; i < 2; i++) {
for (int j = 0; j < ch[i].length; j++)
System.out.print(ch[i][j] + " ");
}
}
}
Predict the output of the following Java code:
public class Abekus {
public static void main(String[] args) throws InterruptedException
{
String S = new String("Abekus");
S = null;
System.gc();
Thread.sleep(500);
System.out.println("Main()");
}
protected void finalize() {
System.out.println("Finalize()");
}
}
import java.util.*;
class result
{
public static void main(String args[])
{
HashMap obj = new HashMap();
obj.put("A", new Integer(1));
obj.put("A", new Integer(3));
obj.put("B", new Integer(2));
obj.put("B", new Integer(4));
obj.put("C", new Integer(8));
obj.put("C", new Integer(8));
obj.put("D", new Integer(7));
obj.put("D", new Integer(9));
obj.put("E", new Integer(4));
obj.put("E", new Integer(5));
obj.put("F", new Integer(6));
obj.put("F", new Integer(6));
System.out.print(obj.toString());
}
}