| 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
|
 |
 |
|
|
subject: why interface methods cannot be declared as native or synchronized?
|
|
|