Break statement causes an exit from-
The Runnable interface contains all the methods used for handling thread related operations in Java
Which of these can be used to fully abstract a class from its implementation?
Which of the following is a valid array declaration ?
Which function of the pre-defined class Thread is used to check whether the current thread being checked is still running?
Which of the following is true about Constructor?
What will be the output of the following code?
class A
{
public static void main(String args[])
{
String str = "I eat Mango";
System.out.println(str.charAt(2));
}
}
What is an Atomic action in Concurrency in Java?
During method overloading, which of the following task does not occur?
Select the correct option for the following Java code.
public class Abekus extends Thread {
public static void main(String[] args) {
try {
Thread t1 = new Thread(new Abekus());
Thread t2 = new Thread(new Abekus());
t1.start();
t2.start();
}
catch (Exception e) {
System.out.print("First catch");
}
}
public void run() {
for (int i = 0; i < 2; i++)
{
try {
Thread.sleep(100);
}
catch (Exception e) {
System.out.print("Second catch ");
}
System.out.print(Thread.currentThread().getName());
}
}
}