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
Is nan false?
Differentiate between array list and vector in java.
A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.
What does system out println () do?
What are variable names?
What is a stringbuffer?
When can you say a graph to be a tree?
What is exception in java?
Can we use this () and super () in a method?
What is the symbol for line break?
Define a package.
What is foreach loop in java?
Give differences between Quicksort &Mergesort. When should these sorts be used andwhat is their running time in java?
What is difference between this and super keyword?
From the two, which would be easier to write: synchronization code for ten threads or two threads?