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


Please Help Members By Posting Answers For Below Questions

What is the properties class?

567


What will be the initial value of an object reference which is defined as an instance variable?

653


Find the value of a specified element of the array arr[i] where 0 <= i <= n-1

551


What are the different ways of creating thread?

578


What is the purpose of the main method?

549






What are the four versions of java?

563


Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain

1446


What is java’s garbage collected heap?

547


What are the drawbacks for singleton class?

528


What is the use of beaninfo?

593


what do you mean by java annotations?

560


What is double checked locking in singleton?

621


Explain about strings in java?

628


Which sorting is used in arrays sort in java?

594


Can we declare an array without size in java?

526