• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Abstract Interface & Normal Inter.

 
Manish Malhotra
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic