Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Java Abstract Class and Method

abstract class Language {

  // method of abstract class
  public void display() {
    System.out.println("This is Java Programming");
  }
}

class Main extends Language {
  public static void main(String[] args) {
    
    // create an object of Main
    Main obj = new Main();

    // access method of abstract class
    // using object of Main class
    obj.display();
  }
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #Java #Abstract #Class #Method
ADD COMMENT
Topic
Name
7+1 =