File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Marcus Exam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Marcus Exam" Watch "Marcus Exam" New topic

Marcus Exam

Thiru Thangavelu
Ranch Hand

Joined: Aug 29, 2001
Posts: 219
Is this answer explanation is correct in marcus exam 2? He didn't mention why doesn't cause the error? I guess since the Thread method has run() method which will be called when there is no explicit run() in your class. Is this correct?
public class Bground extends Thread{
public static void main(String argv[]){
Bground b = new Bground();;
public void start(){
for (int i = 0; i <10; i++){
System.out.println("Value of i = " + i);

Thanks,<br />Thiru<br />[SCJP,SCWCD,SCBCD]
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
Originally posted by Thiru Thangavelu:
Is this correct?

Yes. The class Thread implements the Runnable interface so it is required to have a run method. Of course, the run method, as defined in Thread, does nothing. However, as Thread has a run method, it is legal to invoke it.

SCJP Tipline, etc.
I agree. Here's the link:
subject: Marcus Exam
It's not a secret anymore!