The program demonstrates inheritance by defining a Father class with an integer field a, then defining a Child class that extends Father and is able to access the inherited field a to print its value of 10 in the main method.
The program demonstrates inheritance by defining a Father class with an integer field a, then defining a Child class that extends Father and is able to access the inherited field a to print its value of 10 in the main method.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
The program demonstrates inheritance by defining a Father class with an integer field a, then defining a Child class that extends Father and is able to access the inherited field a to print its value of 10 in the main method.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd