aspose 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 Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Abstract class and Interface" Watch "Abstract class and Interface" New topic
Author

Abstract class and Interface

saravana kumar
Ranch Hand

Joined: Jun 25, 2002
Posts: 72
can a abstract class exist without abstract method ?
is it possible a interface class has empty body ?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Yes, you can have an abstract class with no abstract methods. Yes, you can have empty interfaces -- like java.lang.Cloneable and java.io.Serializable.


[Jess in Action][AskingGoodQuestions]
Phani Kumar
Greenhorn

Joined: Feb 15, 2002
Posts: 22
You can have interface without body and it has got a special name "Marker interface"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Abstract class and Interface