This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes why interface methods cannot be declared as native or synchronized? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "why interface methods cannot be declared as native or synchronized?" Watch "why interface methods cannot be declared as native or synchronized?" New topic
Author

why interface methods cannot be declared as native or synchronized?

michael wang
Ranch Hand

Joined: Feb 06, 2002
Posts: 35
i know that interface method cannot be declared as abstract,but i don'e know why interface methods cannot be declared as native or synchronized?


--<br />a java beginner from China
Macon Pegram
Greenhorn

Joined: Mar 01, 2002
Posts: 12
Interface methods merely describe a contract that an implementing class must fufill. They do not describe in any way the implementation details.
native and synchronized refer to implementation details that are not only not known, but also not relevant when specifying an interface.
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
You can also refer the following yesterday's discussion about the topic:
http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=24&t=015080


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Macon Pegram
Greenhorn

Joined: Mar 01, 2002
Posts: 12
You beat me to it Vallentin! I was just getting ready to post that exact same comment!
Macon
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why interface methods cannot be declared as native or synchronized?