File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes how every methods in interfaces are public abstract by default Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "how every methods in interfaces are public abstract by default" Watch "how every methods in interfaces are public abstract by default" New topic
Author

how every methods in interfaces are public abstract by default

S.Reddisekhar Reddy
Greenhorn

Joined: Jan 05, 2012
Posts: 10
how every methods in interfaces are public abstract by default
Seetharaman Venkatasamy
Bartender

Joined: Jan 28, 2008
Posts: 4503

because it is a specification, whole world have to see this interface before going for a contract.


Not everything that counts can be counted, and not everything that can be counted counts-Albert Einstein
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 3143
S.Reddisekhar Reddy wrote:how every methods in interfaces are public abstract by default


Because the JLS defines it that way and compilers are written to implement the JLS.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 3905
think about the alternatives. what good would a private abstract method be?

as for abstract, you you want non-abstract methods you use abstract class instead of interface


I never took notes in college. That's how I got a 4.0 the first 2 years, and a 3.5 the second two years.
 
 
subject: how every methods in interfaces are public abstract by default
 
Threads others viewed
Implementing interfaces
Abstract class and interface.
Inner Class in the Interface
interface/interface's method declaration
Java Interfaces
developer file tools