-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0527e8a
commit 155205e
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
JavaDsaWithTest/src/main/java/org/practice/dsa/asked_in_interview/A.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.practice.dsa.asked_in_interview; | ||
|
||
public class A { | ||
public void printMethod() { | ||
System.out.println("A"); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
JavaDsaWithTest/src/main/java/org/practice/dsa/asked_in_interview/B.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.practice.dsa.asked_in_interview; | ||
|
||
public class B extends A{ | ||
@Override | ||
public void printMethod() { | ||
super.printMethod(); | ||
System.out.println("B"); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
JavaDsaWithTest/src/main/java/org/practice/dsa/asked_in_interview/C.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.practice.dsa.asked_in_interview; | ||
|
||
import java.util.UUID; | ||
|
||
public class C extends B{ | ||
@Override | ||
public void printMethod() { | ||
super.printMethod(); | ||
System.out.println("C"); | ||
} | ||
|
||
public static void main(String[] args) { | ||
C c = new C(); | ||
c.printMethod(); | ||
UUID uuid = UUID.randomUUID(); | ||
System.out.println(uuid); | ||
} | ||
} |