The Process of deriving new class from existing class.This is called Inheritance. New Class is called Child Class Existing Class is called Parent Class taking example of door A door to your home A door to neighbor's home A door to a temple A door to a company All are different door look wise but derived from an existing class Door Taking example..... class Faculty { float salary=30000; } class Science extends Faculty { float bonous=2000; public static void main(String args[]) { Science obj=new Science(); System.out.println("Salary is:"+obj.salary); System.out.println("Bonous is:"+obj.bonous); } } | 0 |
By: [email protected] On: Sat Feb 04 15:02:21 IST 2017 0 0 0 | 0 |
Are You Satisfied :0Yes0No |