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
Why singleton class is used in java?
How do you define a method?
Find the value of a specified element of the array arr[i] where 0 <= i <= n-1
What is communist flag?
What is the use of arraylist in java?
What is meant by stack and queue?
Can java list be null?
why we use merge option in hybernate pls give a ex snippet
What is lazy programming?
Which is best ide for java?
Which category the java thread do fall in?
What is == and === in javascript?
Write a method to check if input string is palindrome?
What is data structure in java?
How do you override a private method in java?