We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4afea74 commit 0395487Copy full SHA for 0395487
47.this_and_super_keyword/cwh_47_this_super.java
@@ -0,0 +1,30 @@
1
+import javax.print.Doc;
2
+class EkClass{
3
+ int a;
4
+ public int getA() {
5
+ return a;
6
+ }
7
+
8
+ EkClass(int a) {
9
+ this.a = a;
10
11
12
+ public int returnone() {
13
+ return 1;
14
15
+}
16
17
+class DoClass extends EkClass {
18
+ DoClass(int c) {
19
+ super(c);
20
+ System.out.println("I am a constructor");
21
22
23
24
+public class cwh_47_this_super {
25
+ public static void main(String[] args) {
26
+ EkClass e = new EkClass(65);
27
+ DoClass d = new DoClass(5);
28
+ System.out.println(e.getA());
29
30
0 commit comments