- class Mother
- {
- String x="Mother CLASS";
- }
- class Beti extends Mother
- {
- String x="Beti CLASS";
- void show()
- {
- System.out.println(x);
- System.out.println(this.x);
- System.out.println(super.x);
- }
- public static void main (String ...a)
- {
- new Beti().show();
- }
- }
- Output:
- Beti CLASS
- Beti CLASS
- Mother CLASS
| Copyright ©2016 | All Rights Reserved |
| Design by Uves Khan |