Which of these are selection statements in Java?
Which of these classes is not included in java.lang?
Which method can be defined only once in a Java program?
Which Java event is generated when the size of a component is changed?
Which of the following Java interfaces define four methods?
What is the correct syntax of the conditional operator in Java?
How many times 'Hello' is printed?
public class abekus {
public static void main(String[] args){
for(int i = 0; i<5; i++)
{
System.out.println("Hello");
}
}
}
What is the output of the following Java code?
class leftshift_operator {
public static void main(String args[]) {
byte x = 64;
int i;
byte y;
i = x << 2;
y = (byte) (x << 2);
System.out.print(i + " " + y);
}
}
What is the output of the following Java code?
import java.util.Scanner;
public class ex {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
System.out.print(s.next());
}
}
If the input is Hello World !!!!
class test{
public static void main (String[] args) {
int[] A=new int[2];
int[] B=new int[5];
A=B;
System.out.println(A[0]);
System.out.print(B[0]);
}
}