6
Loading subject content…
Loading subject content…
Loading practice questions…
What is the output of the following program?
public class Main {
public static void main(String[] args) {
boolean a = false;
if (a = true) System.out.println("yes");
else System.out.println("no");
}
}What is the output of the following program?
public class Main {
public static void main(String[] args) {
int x = 6;
System.out.println((x & 3) + " " + (x | 3) + " " + (x ^ 3));
}
}What is the output of the following program?
public class Main {
public static void main(String[] args) {
byte b = 127;
b++;
System.out.println(b);
}
}What is the output of the following program?
public class Main {
public static void main(String[] args) {
System.out.println((-16 >> 2) + " " + (-16 >>> 28));
}
}