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

What is a default constructor and also define copy contrucyor?

0 Answers   Global Logic,


Is empty string in java?

0 Answers  


What is tcp and udp?

0 Answers  


Can a constructor have different name than a class name in java?

0 Answers  


What is a thin-client application?

5 Answers   Adobe,






What restrictions are placed on method overriding?

0 Answers  


What are different types of expressions?

0 Answers  


how to split string in java?

0 Answers  


What is this keyword in java?

0 Answers  


Define inheritance with reference to java.

0 Answers  


What are the basic concepts of OOPS in java?

0 Answers   Axtria, ITC Indian Tobacco Company,


What is complexity and its types?

0 Answers  


Categories