Can there be an abstract class with no abstract methods in it?
Answer Posted / pankaj kumar
Yes,If A class have an abstract method the class must be declared as abstract, but if a class is declared as abstract
then,this is not mandatory that class hold any abstract method.
exa :
1. public Abstract class a{
// instance method;
}
///Above declaration is right
2. public class a{
// instance method;
// abstract method; //then you must declare this class as abstract.
}
///Above declaration is right
| Is This Answer Correct ? | 13 Yes | 2 No |
Post New Answer View All Answers
what is meant by encapsulation?
Explain garbage collection in java?
Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)
What is an example of a constant variable?
Have you ever used hashtable and dictionary?
When does an object becomes eligible for garbage collection in java?
What are sets in java?
What's the base class in java from which all classes are derived?
What is a newline character in java?
What are scriptlets?
What is boolean data type in java?
Why we override equals() method?
What is included in core java?
What isan abstract class and when do you use it?
Compare java and python.