Meaningless Drivel is fun!*
The moose likes Java in General and the fly likes Abstract Interface & Normal Inter. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Abstract Interface & Normal Inter." Watch "Abstract Interface & Normal Inter." New topic
Author

Abstract Interface & Normal Inter.

Manish Malhotra
Greenhorn

Joined: Apr 05, 2003
Posts: 29
Dear friends,
What is the differnce between Abstract Interface & Normal Inter.?
Because the Collection interface is a abs. interface & there r few methods which r optional for the implementented classes to implement those methods.
And 2> Is Serializable in a NULL interface?
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
What is the differnce between Abstract Interface & Normal Inter.?
Really, all interfaces are abstract. They provide a set of methods with which to interact with implementing classes or a contract if you will.
Because the Collection interface is a abs. interface & there r few methods which r optional for the implementented classes to implement those methods.
I think you are misinterpreting what optional means here. If you create a class that implements Collection, you must implement all methods in the Collection interface, even those described as optional, or declare the class to be abstract. What optional means in the case of the Collection interface is how an implementing class deals with issues like whether null references are allowed, etc.
[ June 08, 2003: Message edited by: Michael Morris ]

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Abstract Interface & Normal Inter.