-
Notifications
You must be signed in to change notification settings - Fork 8
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
0 parents
commit 857dace
Showing
12 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
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,11 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"type": "java", | ||
"name": "CodeLens (Launch) - App1", | ||
"request": "launch", | ||
"mainClass": "App1", | ||
"projectName": "App_8dae3a26" | ||
} | ||
] | ||
} |
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 App; | ||
|
||
class App1{ | ||
public static void main(String[] args) { | ||
|
||
} | ||
} |
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,11 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"type": "java", | ||
"name": "CodeLens (Launch) - App1", | ||
"request": "launch", | ||
"mainClass": "package1.App1", | ||
"projectName": "java_c87954b4" | ||
} | ||
] | ||
} |
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,11 @@ | ||
package package1; | ||
|
||
import package2.App2; | ||
|
||
class App1{ | ||
public static void main(String[] args) { | ||
App2 data = new App2(); | ||
data.read_message(); | ||
System.out.print(data.name); | ||
} | ||
} |
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,10 @@ | ||
package package2; | ||
|
||
public class App2{ | ||
public String name = "Coder Shiyar"; | ||
|
||
public void read_message(){ | ||
System.out.print("You can access the class App2 now "); | ||
} | ||
} | ||
|
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,11 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"type": "java", | ||
"name": "CodeLens (Launch) - App1", | ||
"request": "launch", | ||
"mainClass": "package1.App1", | ||
"projectName": "package1_f1ba6ba6" | ||
} | ||
] | ||
} |
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,10 @@ | ||
package package1; | ||
|
||
class App1 extends App3{ | ||
|
||
public static void main(String[] args) { | ||
App1 app = new App1(); | ||
app.display_message(); | ||
System.out.println(app.name); | ||
} | ||
} |
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,6 @@ | ||
package package1; | ||
|
||
public class App2 extends App3 { | ||
String city = "Kobani"; | ||
|
||
} |
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,10 @@ | ||
package package1; | ||
|
||
public class App3 { | ||
|
||
String name = "Coder Shiyar"; | ||
|
||
public void display_message(){ | ||
System.out.println("I am a method from the class App2 "); | ||
} | ||
} |
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,11 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"type": "java", | ||
"name": "CodeLens (Launch) - Admin", | ||
"request": "launch", | ||
"mainClass": "Admin", | ||
"projectName": "java_c87954b4" | ||
} | ||
] | ||
} |
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,21 @@ | ||
|
||
public class Admin extends User{ | ||
// SubClass | ||
// SuperClass | ||
|
||
String name = "ROOT_ADMIN"; | ||
|
||
public void getName(){ | ||
System.out.println(super.name); | ||
} | ||
|
||
public void getValue() { | ||
super.getName(); | ||
} | ||
public static void main(String[] args) { | ||
Admin admin = new Admin(); | ||
admin.getName(); | ||
admin.getValue(); | ||
|
||
} | ||
} |
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,8 @@ | ||
public class User{ | ||
String name = "ROOT_USER"; | ||
|
||
public void getName(){ | ||
System.out.println("Method from User"); | ||
} | ||
|
||
} |