• Post Reply Bookmark Topic Watch Topic
  • New Topic

interface vs abstraction  RSS feed

 
vivek shankare gowda
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the main difference between interface and abstraction? when we use interface and when we use abstraction?
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know you are beginning Java, and this question is of the basics you will be asked in any interview.

If you take the time to research, then post back here, I (and probably others) will help analyze your findings.

Good luck,

Pat.
 
dennis deems
Ranch Hand
Posts: 808
 
Campbell Ritchie
Marshal
Posts: 56570
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you mean “abstraction”, or “abstract classes”? The two are very different things.
 
Sunil Sunny
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when we use interface and when we use abstraction?


if you mean abstract classes then There is no perfect definition of this by Sun . We have to use them according to what situation demands.
 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sunil Sunny wrote:if you mean abstract classes then There is no perfect definition of this by Sun

Quite interesting. I found this.
 
dennis deems
Ranch Hand
Posts: 808
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anayonkar Shivalkar wrote:
Sunil Sunny wrote:if you mean abstract classes then There is no perfect definition of this by Sun

Quite interesting. I found this.

Yeah that first sentence is perfect all right. :P
An abstract class is a class that is declared abstract
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!