1.
What is the output of the following Java code:
import java.util.*;
class Array {
    public static void main(String args[]) {
        int array[] = new int[5];
        for (int i = 5; i > 0; i--)
            array[5 - i] = i;
        Arrays.sort(array);
        System.out.print(Arrays.binarySearch(array, 2));
    }
}
2.
In Java, which of the following class objects is used to form a dynamic array?
3.
In Java, which of the following is a legacy class?
4.
In Java, which of the following methods is used to allocate memory to an object?
5.
What is the output of the following Java code:
class A {
    void show() {
        System.out.println("Done");
    }
}
public class Main {
    public static void main(String[] args) {
        A t = new A();
        t.show();
    }
}
6.
What is the output of the following Java code:
class A {

    void show() {
        System.out.println("Done");
    }
}


public class Main {

    public static void main(String[] args) {
        A t
        t.show();
    }
}
7.
What is the output of the following Java code:
class Test {

    public static void main(String args[]) {
        final int x = 100;
        int x = 30;
        System.out.println(x);
    }
}
8.
What is the output of the following Java code:

class Test {

    public static void main(String args[]) {
        int x = -1;
        System.out.println(x >>> 29);
    }
}
9.
What is the output of the following Java code:

class Test {
    public static void main(String args[]) {
        int x = -1;
        System.out.println(x >>> 30);
    }
}
10.
What is the output of the following Java code:
 
class Main {
    public static void main(String args[]) {
        Integer x = 1000, y = 1000;
        if (x == y)
            System.out.println("Same");
        else
            System.out.println("Not Same");
    }
}