Can there be an abstract class with no abstract methods in it?



Can there be an abstract class with no abstract methods in it?..

Answer / 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

More Core Java Interview Questions

Can we restart a dead thread in java?

0 Answers  


What is oops in java?

0 Answers  


What is the difference between abstract class and interface1? What is an interface?

0 Answers  


What is the purpose of using break in each case of switch statement?

0 Answers  


How many tetrahedral voids are there in bcc?

0 Answers  


What is the maximum size of a string in java?

0 Answers  


What is the use of math abs in java?

0 Answers  


Why do people says “java is robust”?

0 Answers  


How do I stop concurrentmodificationexception?

0 Answers  


what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent

0 Answers  


Does isempty check for null?

0 Answers  


What is a null check?

0 Answers  


Categories