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

Why singleton class is used in java?

1124


How do you define a method?

974


Find the value of a specified element of the array arr[i] where 0 <= i <= n-1

978


What is communist flag?

1009


What is the use of arraylist in java?

1091


What is meant by stack and queue?

1064


Can java list be null?

992


why we use merge option in hybernate pls give a ex snippet

1993


What is lazy programming?

1038


Which is best ide for java?

1040


Which category the java thread do fall in?

995


What is == and === in javascript?

1054


Write a method to check if input string is palindrome?

1019


What is data structure in java?

982


How do you override a private method in java?

976