शुक्रवार का कार्य

सभी शुक्रवार के साथ!



हम ज्ञान और हमारे ध्यान की जांच करते हैं। जावा कोड दिया गया:



  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 सावधानी - सही उत्तर पहले से ही टिप्पणियों में है। मैं आपको अन्य पीएल में एक परीक्षा आयोजित करने और टिप्पणियों में परिणाम देने के लिए कहता हूं।



All Articles