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
we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.
What is passing by reference in java?
Does java map allow duplicates?
When is an object subject to garbage collection?
What are the advantages of unicode?
What is a hashmap used for?
What do you understand by final value?
Which methods are used during serialization and deserialization process?
What is a dynamic array in java?
Explain about fail safe iterators in java?
How do you clear a list in java?
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 do you mean by global variable?
Explain the usage of this with constructors?
What is immutability in java?