File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes In the real world where can i use the interfaces and abstract classes . Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "In the real world where can i use the interfaces and abstract classes ." Watch "In the real world where can i use the interfaces and abstract classes ." New topic
Author

In the real world where can i use the interfaces and abstract classes .

sajja bala
Greenhorn

Joined: Dec 12, 2007
Posts: 11
Hi ranchers

My dilema is ; in the real world where can i exactly use the interface and the abstract class. I want the clear scenario in the usage.


Have a Good Day........<br />Sajj Bala Subrahmanyam
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42929
    
  68
You might start by working through the Java Tutorial chapter on interfaces and inheritance.
Atulya Mahajan
Greenhorn

Joined: Dec 16, 2007
Posts: 14
To put it roughly, an interface is an idea, but an abstract class goes a step ahead in implementing that idea, but not completely.

Comparable interface doesnt do anything itself, but any class implementing the interface has the distinct behavior of being able to compare its objects.

An abstract class says that hey, i am implementing some stuff that will apply to all subclasses, but there are some things so specific that it doesnt make any sense for me to define those. That stuff is left for the subclasses.

hope this helps!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: In the real world where can i use the interfaces and abstract classes .