Can i have abstract class with no abstract methods?

Answer Posted / manish kushwaha

HI All,

In Java there is very lovely concept related to Abstract
Class, keep this concept always in your mind i.e.
1) A class can be abstract "without any abstract method".
2) But if a single method is abstract you need to declare
your class as abstract this is mandatory but if class is
abstract then its not mandatory to have abstract methods
as mentioned above.

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can an interface extend a class?

534


What is keyset in java?

647


What is the private method modifier?

570


What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?

676


How do you convert an int to a string in java?

533






What are the loops in java?

515


Is stringwriter thread safe?

542


Which package is imported by default?

623


What is a parameter in matrices?

539


Explain the importance of finally block in java?

564


What is the difference between logical data independence and physical data independence?

525


Why does my function print none?

516


What is an interface in java? Explain

567


Does substring start with 0?

550


What are different ways of object creation in java ?

564