• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding Abstraction

 
sukhavasi vasavi
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we relate Abstract class with the abstraction?
 
phani bhushan reddy
Greenhorn
Posts: 27
Eclipse IDE Fedora Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could you please post your question clearly
 
sukhavasi vasavi
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abstraction in terms of Dictionary word.
Abstract class is related with that?
 
sukhavasi vasavi
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abstraction in terms of Dictionary word.
Abstract class is related with that?
 
Deepinder Singh
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An abstract class is not a concrete implementation...it either provides some(zero or one) implementation for methods it inherits from another class or implements an interface....

An abstract class cannot be used directly....the first concrete implementation in the inheritance hierarchy will provide all or some features/behavior that would be that of an abstract class...here the abstraction is the behavior which belongs to an abstract class which is inherited by the concrete class....
for eg.

class Parent{
public void method1(){}
}
abstract class Child extends Parent{
public void method2(){}
}
public class Concrete extends Child{
public static void main(String args[]){
new Concrete().method2();//the method2 is behavior inherited and //abstracted out in the code of class Child.
}
}
 
Burkhard Hassel
Ranch Hand
Posts: 1274
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy "Deepinder Singh M" !

This seems to be one of your first postings, so

Welcome to the Ranch!




Hope you'll enjoy.




Only one small issue: The Java Ranch follows a certain policy regarding user names.
The main reasons why and a link how to change yours you'll find here:
http://www.javaranch.com/name.jsp


So, could you please change your user name before your next posting?
It will not affect anything you've already posted here. Just your user name will update.

Regards,
Bu.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic