What is Abstract Class?Explan



Abstract Class  :

In some situations we want to define a superclass that declares the structure of a given abstract without providing a complete implementation of every method. That means we only provide general code and it is developers responsibility to customize that class. To make sure this, we can make the abstract, that means the developer will have to override your method .

The abstract keyword is used to make a method abstract if we have an abstract in a class, we also have to make the class an abstract.

Note :

–> An abstract class is a class that contain one or more abstract methods

–> An abstract class can have instance variables, concrete methods in addition to abstract methods

–> We cannot create object to abstract class

–> We can create reference variables to abstract class

–> All the abstract methods of abstract class should be implemented in its subclass.

–> A class cannot be both abstract and final.

–> Abstract class reference cannot refer to individual methods of the subclasses

Random Posts

  • Jsp Scriplets and Templets
  • What is unicode System
  • Hibernate Interview Questions
  • Thread safety of the servlet
  • Basic Java Interview Question

Post a Comment