A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
Joined: Jun 08, 2005
Jun 08, 2005 06:50:00
My question is if all membars of an interface are by default static final then explicitly defining them in the declaration will make any difference?
Joined: Sep 29, 2002
Jun 08, 2005 07:04:00
declaration in the body of an interface is implicitly public, static and final. It makes no difference whether or not you use these modifiers in your declaration.
In a similar way, every interface method is implicitly public and abstract, so the following are all identical:
public void go(); // not recommended
abstract void go();
public abstract void go(); // not recommended
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
I agree. Here's the link:
Home interface or Home Interface stub
Writing an Interface
How To Call Two Different Classes From the Main Program Using the Same API?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014