1 / 7

Abstract class in java

The Java certification provided by us also has the Oracle seal as the certification is issued by Oracle.<br>https://www.besanttechnologies.com/training-courses/java-training-in-bangalore

DIVYA99
Download Presentation

Abstract class in java

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Abstract class in Java For more details visit this link https://www.besanttechnologies.com/training-courses/java-training-in-bangalore

  2. Abstract class in Java Abstract class in Java as the interface, but may contain the default execution method. The abstract class can have abstract methods without the body and can have methods with the application. Classes are declared as abstract, known as abstract classes. It can have abstract and non-abstract methods. Get 100% Practical Java training • Abstract classes must be declared and the keyword is abstract. • They may have abstract and non-abstract methods. • should not encourage. • They can have a static and solid builder as well. • They may have work that will force the subclass method not to change the body.

  3. Abstract class in Java package Mypkg; public class myabs {       /**        * @paramargs        */       public static void main(String[] args) {             // TODO Auto-generated method stub

  4. Abstract class in Java System.out.println("Entered myabs-Main() "); System.out.println("***************************************"); useabsob=new useabs(); ob.getDisplay(); ob.getD(); System.out.println("***************************************"); System.out.println("Exited  myabs-Main() ");       } }

  5. Abstract class in Java abstract class myabsEx {       abstract void getDisplay(); // Abstract method       void getD() // other method       { System.out.println("This is normal method inside Abstract class");       } } class useabs extends myabsEx {      void getDisplay()       { System.out.println("This is re Definition given of  Abstarct method class");       } }

  6. Abstract class in Java Output : Entered myabs-Main() *************************************** This is re Definition given of  Abstarct method class This is normal method inside Abstract class *************************************** Exited  myabs-Main()

  7. Thank you

More Related