pubic static final int p=10 ;
Which two are valid constructors for the Thread
class?
What is the method called which have the same name as of class name?
Which of these methods is used to obtain the object that generated a WindowEvent?
In which programming concept do an instance variable and a local variable have the same name?
Select the correct option for the valid declaration of a boolean variable in Java.
Which is a valid declaration within an interface?
What is true about the do-while statement?
Predict the output of the following Java code:
class Abekus {
Abekus() {
System.out.print("a");
}
}
public class Abekusmain extends Abekus {
Abekusmain() { System.out.print("c"); }
public static void main(String[] args) {
System.out.print("b");
Abekusmain o1 = new Abekusmain();
System.out.print("d");
}
}
Predict the output of the following Java code.
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
public class Abekus {
public static void main(String[] args) throws InterruptedException
{
LinkedBlockingQueue<Integer> l = new LinkedBlockingQueue<Integer>(5);
l.add(56);
l.add(90);
l.add(34);
l.add(73);
l.poll();
System.out.println(l.poll(3, TimeUnit.SECONDS));
}
}