Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is an abstract class and abstract method?

Answer Posted / tarun

Abstract Class : An abstract class can not be initialized.
Any class can extends it. The methods declared in the
abstract class can be abstract or not.
Abstract Method : If any method is declared as abstract
method it should be in a abstract class. And it can be
override by any other class which is extending it. if method
is declared as abstract it should not contain body.

For Example:
public abstract class AbstractEx {
public void reset(){
System.out.println("The Sun Rises in the east");
}
public abstract void method();
protected abstract void newmethod();
}

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is hashset ordered?

1074


what is an objects lock and which objects have locks? : Java thread

1020


What is the meaning of nullable?

1014


What is heterogeneous in java?

963


What is gc()?

1070


Why null value is used in string?

1050


What is the purpose of javac exe?

1098


Is java se open source?

1033


What are the 2 types of java programs?

1115


What is use of a abstract variable?

990


Is linkedlist thread safe in java?

1000


Can we convert stringbuilder to string in java?

989


What is java jit compilers?

1014


What is nested top-level class?

1039


What is the difference between the boolean & operator and the && operator in java programming?

1048