We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9808f48 commit 09fb3a5Copy full SHA for 09fb3a5
exercise.java
@@ -0,0 +1,49 @@
1
+
2
+class A
3
+{
4
+ void display1()
5
+ {
6
+ System.out.println("A's display1");
7
+ }
8
+ void display2()
9
10
+ System.out.println("A's display2");
11
12
+ void display3()
13
14
+ System.out.println("A's display 3");
15
16
+}
17
18
+class B extends A
19
20
21
22
+ System.out.println("B 's display1");
23
24
+ void display4()
25
26
+ System.out.println("B 's display4 ");
27
28
29
30
31
+class C extends B
32
33
34
35
+ System.out.println("c 's display 3");
36
37
38
+public class Main
39
40
+ public static void main(String[] args)
41
42
+ A a=new A();
43
+ a.display1();
44
+ B b=new B();
45
+ b.display1();
46
+ B c=new C();
47
+ c.display3();
48
49
0 commit comments