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 difference between string and stringbuffer?
Explain about core java?
Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?
What's the purpose of using break in each case of switch statement?
What is factor r?
Does java arraylist maintain insertion order?
Does chrome use java?
What are Normalization Rules? Define Normalization?
Write an algorithm program in java for the following question.. In a VLSI design techniques,they used rectangles to design circuits. EVery rectangle is to be placed according to x,y coordinates. Check whether or not two rectangles overlap each other. Here overlapping of rectangles is acceptable, if 1) one rectangle intersect with other. 2) one rectangle fully covers other. The time of algorithm should not exceed o(n logn).
What is another word for methodology?
What is the method overriding?
Explain the available thread states in a high-level?
What does java ide mean?
What do you mean by JVM?
When do I need to use reflection feature in java?