1.
What is the output of the following Java code:
public class test {
    public static void main(String args[]) {
        boolean x = true;
        int a;
        if (x)
            a = x ? 1 : 2;
        else
            a = x ? 3 : 4;
        System.out.println(a);
    }
}
2.
What is the output of the following Java code:
public class test {
    public static void main(String args[]) {
        boolean x = false;
        int a;
        if (x)
            a = x ? 1 : 2;
        else
            a = x ? 3 : 4;
        System.out.println(a);
    }
}
3.
What is the output of the following Java code:
public class test {
    public static void main(String args[]) {
        System.out.println(~4);
    }
}
4.
What is the output of the following Java code:

public class Test {
    public static void main(String[] args) {
        int x = 25;
        if (x < 50 && x < 0) {
            System.out.println("OK");
        }
        if (x < 50 & x > 0) {
            System.out.println("Yup");
        }
    }
}
5.
What is the output of the following Java code:
public class Test {
    public static void main(String[] args) {
        int x = 10, y = 15;
        if (++x > 10 && ++y > 15) {
            System.out.println(x);
        }
    }
}
6.
What is the output of the following Java code:
public class Test {
    public static void main(String[] args) {
        int x = 10, y = 15;
        if (++x > 10 || ++y > 15) {
            System.out.println(x++);
        }
    }
}
7.
In Java, a class contains ________________________________.
8.
In Java, which of the following types of variables are available?
9.
In Java, which of the following is a primitive data type?
10.
In Java, a variable that is declared inside a constructor is called a _______________________ variable.