Two Laptop Bag
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: 15
how every methods in interfaces are public abstract by default
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

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

Joined: Jan 03, 2004
Posts: 6109
    
    6

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: 4095
    
    1
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


SCJP
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how every methods in interfaces are public abstract by default
 
Similar Threads
Implementing interfaces
interface/interface's method declaration
Abstract class and interface.
Inner Class in the Interface
Java Interfaces