Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class A {
- static B classB;
- public static void main(String [] args) { // po spusteni vypise "1"
- classB = new B();
- new C();
- }
- }
- public class B {
- public static int b;
- B() {
- b = 1;
- }
- }
- public class C {
- C() {
- System.out.println(B.b);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment