1 Replies - 293 Views - Last Post: 22 November 2011 - 12:58 AM Rate Topic: -----

#1 ravi_java_hyd  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 22-November 11

Abstract VS Interface

Posted 22 November 2011 - 12:47 AM

I just need a real world or real time(bank or school or any project related) example and decribe when and why we have to go for abstarct class and when we have to go for interface. I dont want any differences between them .. I just need an exampe to tell in intervews. Thanks in advance.
Is This A Good Question/Topic? 0
  • +

Replies To: Abstract VS Interface

#2 smohd  Icon User is offline

  • Critical Section
  • member icon


Reputation: 1817
  • View blog
  • Posts: 4,625
  • Joined: 14-March 10

Re: Abstract VS Interface

Posted 22 November 2011 - 12:58 AM

When to use the abstract or Interface depends on the design, and we cant just say, "example of interface is....". These things can be decided by the design presented.
What we have is this - Abstract classes and interfaces tutorial, then you can examples if you understand it.
Also you can look at Java APIs and see when people use interface and when use abstract class during development.

This post has been edited by smohd: 22 November 2011 - 01:01 AM

Was This Post Helpful? 2
  • +
  • -

Page 1 of 1