Given a sample code:
public class Test extends Thread {
static String name = "raj";
public static void main(String args[]) {
Test t = new Test();
t.testMethod(name);
System.out.print(" " + name);
}
public void testMethod(String name) {
start();
System.out.print(" method");
}
public void run() {
System.out.print(" run");
}
}
Which of the following statement is correct ?
(A) raj method run
(B) method raj run
(C) run method run
(D) run raj method
(B)
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.