A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Java
»
Java in General
Author
how every methods in interfaces are public abstract by default
S.Reddisekhar Reddy
Greenhorn
Joined: Jan 05, 2012
Posts: 15
posted
Feb 08, 2012 06:51:46
0
how every methods in interfaces are public abstract by default
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
I like...
posted
Feb 08, 2012 06:54:58
0
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
I like...
posted
Feb 08, 2012 06:57:23
2
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
posted
Feb 08, 2012 10:18:51
0
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
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter