This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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: 42035
    
  64
You might start by working through the Java Tutorial chapter on interfaces and inheritance.


Ping & DNS - my free Android networking tools app
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!
 
GeeCON Prague 2014
 
subject: In the real world where can i use the interfaces and abstract classes .