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
What is the difference between a choice and a list?
Discuss 2D arrays.
Explain the use of shift operator in java. Can you give some examples?
Is boolean a wrapper class in java?
What are the actions that can occur when a thread enters blocked state?
How does thread synchronization occurs inside a monitor?
How can you say java is object oriented?
difference between byte stream class and character stream class?
How do I get 64 bit java?
What is string pool in java?
What is difference between identifier and variable?
What things should be kept in mind while creating your own exceptions in java?
What access modifiers can be used for variables?
What are the ways in which a thread can enter the waiting state?
what type of questions asked for barclays technologies pune please send urgent