I Have a class abstract with one abstract method, so that
method should override in the subclass, but i dont want to
override, if i am not override what will happen? If
compilation will occur then i dont want to give compilation
error, then what we need to do???
See the sample program.
public abstract class AbstractExample {
public abstract void sampleMethod();
}
public class AbstractExampleImple extends AbstractExample {
}
Answer Posted / shreya tanavade
if you dont want to override the abstract method i.e. SampleMethod ,then you must declare the subclass as ABSTRACT..i.e.declare....public declare class AbstractExampleImple ...otherwise it wuld throw compilation error
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is a method in coding?
What is ordered map in java?
What is e in java?
What is tochararray in java?
How can we create an immutable class in java?
What is an example of a boolean?
What is package protected in java?
What are three types of loops in java?
Can we create our own daemon thread?
What are thread groups?
What is the primary benefit of encapsulation?
What is a local block?
What is a stringbuilder?
Are arrays dynamic in java?
Does java map allow duplicates?