рд╢реБрдХреНрд░рд╡рд╛рд░ рдХрд╛ рдХрд╛рд░реНрдп

рд╕рднреА рд╢реБрдХреНрд░рд╡рд╛рд░ рдХреЗ рд╕рд╛рде!

рд╣рдо рдЬреНрдЮрд╛рди рдФрд░ рд╣рдорд╛рд░реЗ рдзреНрдпрд╛рди рдХреА рдЬрд╛рдВрдЪ рдХрд░рддреЗ рд╣реИрдВред рдЬрд╛рд╡рд╛ рдХреЛрдб рджрд┐рдпрд╛ рдЧрдпрд╛:

  1. public class Foo { private static Foo instance = new Foo(); private static final int DELTA = 6; private static int BASE = 7; private int x; private Foo() { x = BASE + DELTA; } public static void main( String ... argv) { System. out .println(Foo.instance.x); } }
  2. public class Foo { private static Foo instance = new Foo(); private static final int DELTA = 6; private static int BASE = 7; private int x; private Foo() { x = BASE + DELTA; } public static void main( String ... argv) { System. out .println(Foo.instance.x); } }
  3. public class Foo { private static Foo instance = new Foo(); private static final int DELTA = 6; private static int BASE = 7; private int x; private Foo() { x = BASE + DELTA; } public static void main( String ... argv) { System. out .println(Foo.instance.x); } }
  4. public class Foo { private static Foo instance = new Foo(); private static final int DELTA = 6; private static int BASE = 7; private int x; private Foo() { x = BASE + DELTA; } public static void main( String ... argv) { System. out .println(Foo.instance.x); } }
  5. public class Foo { private static Foo instance = new Foo(); private static final int DELTA = 6; private static int BASE = 7; private int x; private Foo() { x = BASE + DELTA; } public static void main( String ... argv) { System. out .println(Foo.instance.x); } }
  6. public class Foo { private static Foo instance = new Foo(); private static final int DELTA = 6; private static int BASE = 7; private int x; private Foo() { x = BASE + DELTA; } public static void main( String ... argv) { System. out .println(Foo.instance.x); } }
  7. public class Foo { private static Foo instance = new Foo(); private static final int DELTA = 6; private static int BASE = 7; private int x; private Foo() { x = BASE + DELTA; } public static void main( String ... argv) { System. out .println(Foo.instance.x); } }
  8. public class Foo { private static Foo instance = new Foo(); private static final int DELTA = 6; private static int BASE = 7; private int x; private Foo() { x = BASE + DELTA; } public static void main( String ... argv) { System. out .println(Foo.instance.x); } }
  9. public class Foo { private static Foo instance = new Foo(); private static final int DELTA = 6; private static int BASE = 7; private int x; private Foo() { x = BASE + DELTA; } public static void main( String ... argv) { System. out .println(Foo.instance.x); } }
  10. public class Foo { private static Foo instance = new Foo(); private static final int DELTA = 6; private static int BASE = 7; private int x; private Foo() { x = BASE + DELTA; } public static void main( String ... argv) { System. out .println(Foo.instance.x); } }
  11. public class Foo { private static Foo instance = new Foo(); private static final int DELTA = 6; private static int BASE = 7; private int x; private Foo() { x = BASE + DELTA; } public static void main( String ... argv) { System. out .println(Foo.instance.x); } }
  12. public class Foo { private static Foo instance = new Foo(); private static final int DELTA = 6; private static int BASE = 7; private int x; private Foo() { x = BASE + DELTA; } public static void main( String ... argv) { System. out .println(Foo.instance.x); } }


рдзреНрдпрд╛рди рджреЗрдВ рд╕рд╡рд╛рд▓! рдХреНрдпрд╛ рдкреНрд░рджрд░реНрд╢рд┐рдд рдХрд┐рдпрд╛ рдЬрд╛рдПрдЧрд╛? рдФрд░ рд╕рдмрд╕реЗ рдорд╣рддреНрд╡рдкреВрд░реНрдг рдмрд╛рдд - рдХреНрдпреЛрдВ?

UPD рд╕рд╛рд╡рдзрд╛рдиреА - рд╕рд╣реА рдЙрддреНрддрд░ рдкрд╣рд▓реЗ рд╕реЗ рд╣реА рдЯрд┐рдкреНрдкрдгрд┐рдпреЛрдВ рдореЗрдВ рд╣реИред рдореИрдВ рдЖрдкрдХреЛ рдЕрдиреНрдп рдкреАрдПрд▓ рдореЗрдВ рдПрдХ рдкрд░реАрдХреНрд╖рд╛ рдЖрдпреЛрдЬрд┐рдд рдХрд░рдиреЗ рдФрд░ рдЯрд┐рдкреНрдкрдгрд┐рдпреЛрдВ рдореЗрдВ рдкрд░рд┐рдгрд╛рдо рджреЗрдиреЗ рдХреЗ рд▓рд┐рдП рдХрд╣рддрд╛ рд╣реВрдВред

Source: https://habr.com/ru/post/In105764/


All Articles