Last active
January 24, 2018 22:33
-
-
Save jeserkin/86152ebb75e32b26b04384f45105648c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public class MyClass { | |
| public static void main(String args[]) { | |
| Example.runExample(); | |
| AnotherExample.runExample(); | |
| } | |
| } | |
| class Example { | |
| private String brand; | |
| private boolean name; | |
| public static void runExample() { | |
| Example example = new Example(); | |
| System.out.println("Sum of x+y = " + example.brand); // this.brand | |
| System.out.println("Sum of x+y = " + example.name); // this.name | |
| } | |
| } | |
| class AnotherExample { | |
| public static void runExample() { | |
| Example example = new Example(); | |
| System.out.println("Sum of x+y = " + example.brand); | |
| System.out.println("Sum of x+y = " + example.name); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment