1.
What is the output of the following Java code:
public class CommandLine {
    public static void main(String[] args) {
        String[] arg;
        int x;
        x = args.length;
        for (int y = 1; y <= x; y++) {
            System.out.print(" " + args[y]);
        }
    }
}

and the command-line invocation,
java CommandLine 1 2 3

What is the output of the above program?
2.
In Java, the width of the int data type is ______________________.
3.
What is the output of the following Java code:
class Super {
    public final void showSample() {
        System.out.println("One");
    }
}
class Sub extends Super {
    public void showSample() {
        System.out.println("Another thing.");
    }
}
4.
What is the output of the following Java code:
public abstract class A {
    abstract void foo();
}
class B extends A {
    void foo(int I) {}
}
5.
What is the output of the following Java code:
import java.util.*;

class TestClass {

    public void sampleMap() {
        TreeMap tm = new TreeMap();
        tm.put("a", "Hello");
        tm.put("b", "Java");
        tm.put("c", "World");
        Iterator it = tm.keySet().iterator();
        while (it.hasNext()) {
            System.out.print(it.next());
        }
    }

    public static void main(String args[]) throws Exception {
        TestClass junk = new TestClass();
        junk.sampleMap();
    }
}
6.
In Java, which of the following statements is true about multi-level inheritance?
7.
What is the output of the following Java code:
class TestClass {
    public static void main(String args[]) throws Exception {

        int z = 8;
        z /= z--;
        System.out.println("Value of z : " + z);
    }
}
8.
What is the output of the following Java code:
class X863 {

    public static void main(String args[]) throws Exception {
        int x = 10;
        switch (x) {
            case 10:
                System.out.println("10");
            case 10:
                System.out.println("10");
            case 20:
                System.out.println("20");
            default:
                System.out.println("30");
        }
    }
}
9.
What is the output of the following Java code:
import java.util.*;

class TestClass {

    public void method(Object object) {
        System.out.println("Object");
    }

    public void method(String string) {
        System.out.println("String");
    }

    public static void main(String args[]) throws Exception {
        new TestClass().method(0);
    }
}
10.
What is the output of the following Java code:

class TestClass {

    public static void main(String args[]) throws Exception {
        int x = 0;
        while (0) {
            System.out.print("x plus one is " + (x + 1));
        }
    }
}