- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDynamic_pro.java
More file actions
Latest commit
16 lines (12 loc) · 532 Bytes
/
Copy pathDynamic_pro.java
File metadata and controls
16 lines (12 loc) · 532 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
publicclassDynamic_pro {
publicstaticvoidmain(String[] args)
{
System.out.println("Hello World");
}
}
// Types of inheritance
// 1. Single inheritance :- one class extend another class Box--->>>BoxWeight
// 2. Multilevel inheritance :- one class can inherit from derived class and derived class become parent for another new class
// Ex:- Box--->>BoxWeight-->>BoxPrice
//Multilevel inheritance is not allowed in java
// Polymorphism :- many ways to represent a single entity or items