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


aryan sahu

Joined: Oct 12, 2011
Posts: 11

hello i am a new bie , i am having confusion regarding threads. Do the codes imply the same thing.

Harsha Smith
Ranch Hand

Joined: Jul 18, 2011
Posts: 287
The first code won't compile
John Jai

Joined: May 31, 2011
Posts: 1776
In the first code you are trying to mark the overridden instance method to static - so you get the compile time error.

This behavior is common when you implement an interface or extend a super class.

Have a look at the table in the Summary section of this tutorial -

As you see the error you get is 'static methods cannot hide the instance method in the super class / interface'.
I agree. Here's the link:
subject: Multithreading
It's not a secret anymore!