Created
February 14, 2018 10:53
-
-
Save eckucukoglu/e1b81bc1242bda2f83f6f906e01333e6 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
class A { | |
static final String name = "A"; | |
static final B b = new B(); | |
A () { | |
System.out.println(name + " is loading..."); | |
} | |
} | |
class B { | |
static final String name = "B"; | |
static final C c = new C(); | |
B () { | |
System.out.println(name + " is loading..."); | |
} | |
} | |
class C { | |
static final String name = "C"; | |
static final A a = new A(); | |
C () { | |
System.out.println(name + " is loading..."); | |
} | |
} | |
public class Main { | |
public static void main(String[] args) { | |
A a = new A(); | |
System.out.println("-----"); | |
B b = new B(); | |
System.out.println("-----"); | |
C c = new C(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A is loading...
C is loading...
B is loading...
A is loading...
/----
B is loading...
/----
C is loading...