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
Is hashset ordered?
what is an objects lock and which objects have locks? : Java thread
What is the meaning of nullable?
What is heterogeneous in java?
What is gc()?
Why null value is used in string?
What is the purpose of javac exe?
Is java se open source?
What are the 2 types of java programs?
What is use of a abstract variable?
Is linkedlist thread safe in java?
Can we convert stringbuilder to string in java?
What is java jit compilers?
What is nested top-level class?
What is the difference between the boolean & operator and the && operator in java programming?