Question #1
What is the output of the following method?
public static void main (String[] args) {
final int i = -3;
System.out.print(Integer.toBinaryString(i)+" "); System.out.print(Integer.toHexString(i)+" "); System.out.println(Integer.toOctalString(i)); }
Answer #d
Question #2
What is the output of the following method?
public static void main (String[] args) {
int v1 = 5;
int v2 = 2;
System.out.print(~v1 + " ");
System.out.print((v1 & v2) + " ");
System.out.print((v1 | v2) + " ");
System.out.print((v1 ^ v2) + " ");
System.out.print((-v1 >> v2) + " ");
System.out.print((v1 << v2) + " ");
System.out.println(Integer.toBinaryString(-v1 >>> v2));
}
Answer #c
Question #3
Which of these is not a javadoc tag?
Answer #b