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


Share on Google+Share on Google+
SCJP Module-8 Question-5
Posted on: July 15, 2010 at 12:00 AM
The program given below will test your understanding of Thread execution and thread class in Java.

Given a sample code:

1    public class Test4 extends Thread{
2    public static void main(String args[]){
3    Test4 b = new Test4();
4    b.run();
5    }
6    public void start(){
7    System.out.println("start");
8    }}

Which of the following statement is correct ?

(A) Print start.
(B) Compiled successfully but no result.
(C) Raise Runtime exception.
(D) Compilation error at line no 4.




Related Tags for SCJP Module-8 Question-5:

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 15, 2010

Recommend the tutorial

Advertisements Advertisements