File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Abstract class and Interface" Watch "Abstract class and Interface" New topic

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

Joined: Jul 08, 2003
Posts: 24199

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

[Jess in Action][AskingGoodQuestions]
Phani Kumar

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:
subject: Abstract class and Interface
It's not a secret anymore!