aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes regarding Abstract class and Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "regarding Abstract class and Interface" Watch "regarding Abstract class and Interface" New topic
Author

regarding Abstract class and Interface

kavitha vasu
Ranch Hand

Joined: Feb 22, 2007
Posts: 70
At which situation we are moving to abstract class and interface

Explain me with example
abhrodip paul
Greenhorn

Joined: Oct 16, 2007
Posts: 27
if you implement Interface it will force you to implement the method of the interface also. ok. So when ever you want this kind of situation you can use Interface. Like in Runnable interface java developers want you to implement run method, thats why they made it an Interface.

And Abstract classes are for future utilization. If you are sure that you are or some one else going to improve your class in the future then keep it Abstract.Example Abstract Class AbstractList.
abhrodip paul
Greenhorn

Joined: Oct 16, 2007
Posts: 27
kavitha vasu
Ranch Hand

Joined: Feb 22, 2007
Posts: 70
Hi

Thanks for your reply.

Could you me any real time example for these 2 concepts.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: regarding Abstract class and Interface
 
Similar Threads
Java interface
forcing implementing methods
abstract class Vs interface
Interface problems...
abstract class