aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Another question from marcus green mock exam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Another question from marcus green mock exam" Watch "Another question from marcus green mock exam" New topic
Author

Another question from marcus green mock exam

Veena Pointi
Ranch Hand

Joined: Jun 20, 2002
Posts: 442

The above code compiles & runs fine.Shouldn't it give compile time error?Coz run method of Thread class is not overriden in child class?
[ October 20, 2003: Message edited by: Veena Point ]
[ October 20, 2003: Message edited by: Thomas Paul ]

SCJP1.4
"Continuous effort - not strength or intelligence - is the key to unlocking our potential."
*Winston Churchill
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

Veena - can you please take some time and format your code with whitespace so that its actually readable? Its very difficult to read the code you post when it has no indentation.
Thanks
- Jess
Veena Pointi
Ranch Hand

Joined: Jun 20, 2002
Posts: 442
Sorry Jess,is it ok now?
Thanks
Veena
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
Hi Veena
You need to override the run() method of Runnable either directly or indirectly. If you don't, it's an error. The Thread's class run() method if not overriden would not result in any error. The thread would simply not do anything.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
The run() method of Thread is not an abstract method so it does not have to be overridden.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Another question from marcus green mock exam