aspose file tools*
The moose likes Java in General and the fly likes real time example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "real time example" Watch "real time example" New topic
Author

real time example

ramesh kothakonda
Ranch Hand

Joined: Feb 14, 2006
Posts: 40
Hi javaranchers
i want an example in what situations we may use interfaces and in what situations we may use abstract classes

thanks
with regards,
k.ramesh


The object oriented way of becoming "RICH" is by INHERITANCE<br />Whoever said money can't buy happiness, didn't know where to shop.
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
http://www.javaworld.com/javaworld/javaqa/2001-04/03-qa-0420-abstract.html
http://mindprod.com/jgloss/interfacevsabstract.html


MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
saikrishna cinux
Ranch Hand

Joined: Apr 16, 2005
Posts: 689
dear friend,
1.If you want to achieve multiple inheritence then go for interface
2.and if you dont want to implement one or two methods in your class then better to go for abstract class





A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14269
    
  21

Note, your question does not have anything to do with "real time". You probably mean you want "real life" examples of the use of interfaces and abstract classes.

Please do a search - the difference between interfaces and abstract classes is a frequently asked question.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: real time example