70 likes | 122 Views
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
E N D
Abstract class in Java For more details visit this link https://www.besanttechnologies.com/training-courses/java-training-in-bangalore
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.
Abstract class in Java package Mypkg; public class myabs { /** * @paramargs */ public static void main(String[] args) { // TODO Auto-generated method stub
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() "); } }
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"); } }
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()