Abstract classes may not contain abstract methods
Java Programming Language / Polymorphism in Java
1065Program:
abstract class Parent{ int a=21; } class Child extends Parent{ public static void main(String args[]){ Parent obj = new Child(); System.out.println(obj.a); } }
Output:
21 Press any key to continue . . .
This Particular section is dedicated to Programs only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.
# C Tutorials
# JAVA Tutorials
# HTML Tutorials
# Computer Fundamental
# Data Structure
# DBMS Tutorials
SQL
# C# Language
# R Language
# PHP
# Python
# Vue JS