Home Tutorial Java Scjp Part8 SCJP Module-8 Question-1

 
 

SCJP Module-8 Question-1
Posted on: July 14, 2010 at 12:00 AM
This program will check your Thread concept in Java and prepare you for successful completion of SCJP examination.

Given a sample code:

1    public class Test implements Runnable {
2    public void run() {
3    System.out.println("Inside run");
4    }

5    public static void main(String[] args) {
6    Thread t = new Thread();
7    t.start();
8    System.out.println("End of main");
}}

Which of the following statement is correct ?

(A) Print "Inside run"
(B) Print "Inside run" then "End of main"
(C) Print "End of main"
(D) Print "End of main" then "Inside run"

Answer:

(C)

Related Tags for SCJP Module-8 Question-1: