File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes abstract class and Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "abstract class and Interface" Watch "abstract class and Interface" New topic
Author

abstract class and Interface

Ramakrishna Gummadi
Greenhorn

Joined: Jun 29, 2011
Posts: 16
Can abstract class and interface have 0 or more abstract methods ?
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11406
    
  16

Ramakrishna Gummadi wrote:Can abstract class and interface have 0 or more abstract methods ?

What happened when you tried to do it?


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39395
    
  28
Bhanu Chowdary, please note what is says on the "Beginning Java" contents page:
We're all here to learn, so when responding to others, please focus on helping them discover their own solutions, instead of simply providing answers.
By providing an answer too quickly, you risk depriving people of the opportunity to learn for themselves.

I have obscured your answer, so you are the only ranch hand who can see it.
bhanu chowdary
Ranch Hand

Joined: Mar 09, 2010
Posts: 256
Campbell Ritchie wrote:Bhanu Chowdary, please note what is says on the "Beginning Java" contents page:
We're all here to learn, so when responding to others, please focus on helping them discover their own solutions, instead of simply providing answers.
By providing an answer too quickly, you risk depriving people of the opportunity to learn for themselves.

I have obscured your answer, so you are the only ranch hand who can see it.

I would keep that in mind from now on.
Ramakrishna Gummadi
Greenhorn

Joined: Jun 29, 2011
Posts: 16
I created empty interface... with no abstract methods

It means an interface can have 0 or more abstract methods
bhanu chowdary
Ranch Hand

Joined: Mar 09, 2010
Posts: 256
Ramakrishna Gummadi wrote:I created empty interface... with no abstract methods
It means an interface can have 0 or more abstract methods

Now try the same for abstract class and see what is happening
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39395
    
  28
Have a look in the Java™ Language Specification; I am not sure whether I have given you the most useful link, and it isn't easy to read.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: abstract class and Interface