java - using abstract keyword in interface -
Know the difference between "public interface" and "public abstract interface", but what is the difference when applied to the methods?
public interface IPluggableUi {abstract public JComponent getPanel (); Summary Public initUi (); } or
public interface IPluggableUi {public JComponent getPanel (); Public Zero InitIi (); }
The methods declared in the interface are both public and tabular by default.
However, one can:
public interface myInterface {public abstract zero myMethod (); }
However, the use of these researchers has been frustrated. So is the abstract modifier applied on the interface announcement.
Specifically, regarding your question:
"For compatibility with older versions of the Java platform, this permission is allowed, but disappointed is the subject of style, declared in the interface Specify the abstract modifier for the methods. "
Source:
Section 9.4: Summary Method Announcements.
Comments
Post a Comment