{
  "assessmentTests": {
    "java_test": {
      "name": "Java टेस्ट",
      "desc": "कोर सिंटेक्स, OOP मैकेनिक्स, कलेक्शन्स, जेनेरिक्स, एक्सेप्शन्स और कॉनकरेंसी पर 30 परिदृश्य-आधारित प्रश्न — पता लगाएँ कि क्या आपकी Java वह है जो नौकरी की पोस्टिंग Java प्रवीणता से माने।",
      "recommendation": "आपकी Java कौशल प्रोफ़ाइल",
      "results": {
        "beginner": {
          "name": "नौसिखिया",
          "desc": "आप काम करने वाली classes और methods लिख सकते हैं, लेकिन जो questions आप miss करते हैं वे identity और defaults के आसपास cluster करते हैं न कि syntax के — String == बनाम .equals(), नई String(\"x\") क्यों कभी string pool को दोहराती नहीं है, एक numeric field क्या default होता है बनाम एक wrapper field। यह Java में bad होने के बारे में नहीं है; ये specific rules हैं जो उन लोगों को confuse करते हैं जिन्होंने language को trial और error द्वारा सीखा है बजाय यह समझने के कि references और primitives वास्तव में कैसे काम करते हैं। वे काम पर मायने रखते हैं क्योंकि हर एक जगह है जहाँ code compile होता है, runs करता है, और silently गलत काम करता है।",
          "recommendation": "इन तीन चीजों से शुरू करें, इसी order में: दो String objects पर == क्यों characters को compare नहीं करता बल्कि references (और .equals वह है जो आप लगभग हमेशा चाहते हैं), कैसे int overflow silently wrap करता है throwing के बजाय, और क्यों एक uninitialized Integer field null में default होता है जबकि एक int field 0 में default होता है। Oracle की official Java tutorials और Baeldung दोनों runnable examples के साथ सभी तीन को cover करते हैं।"
        },
        "intermediate": {
          "name": "मध्यवर्ती",
          "desc": "आप everyday application code में comfortably काम करते हैं — classes, collections, straightforward control flow — और routine feature work से slow नहीं होंगे। यहाँ से Advanced तक की gap ज़्यादातर यह है कि जब Java के rules concurrency और generics के साथ interact करते हैं: एक static method जो declared type के द्वारा resolve होता है आपके expected object के बजाय, एक HashMap iteration order जिस पर आप silently rely करते हैं, एक ConcurrentModificationException loop के बीच एक item को remove करने से। ये bugs हैं जो एक quick read-through को pass करते हैं और केवल एक specific runtime condition में appear होते हैं।",
          "recommendation": "ध्यान दें कि कंपाइलर का static view आपके code से कैसे differ है जो चलता है: overload resolution और static-method hiding by declared type rather than runtime type, क्यों HashMap कोई iteration-order guarantee नहीं देता, और क्यों सीधे iterating के दौरान एक list को modify करने से ConcurrentModificationException throw होता है। फिर generics erasure, क्योंकि वह लोगों को trip up करता है जो पहले से collections को individually know करते हैं।"
        },
        "advanced": {
          "name": "उन्नत",
          "desc": "यह वह level है जो अधिकांश job postings \"strong Java\" से मतलब है। आप एक class को static blocks, instance blocks और multiple constructors के साथ पढ़ सकते हैं और exact order को predict कर सकते हैं कि वे कब run करते हैं, आप जानते हैं कि एक finally block क्यों silently एक try block के return value को discard कर सकता है, और आप try-with-resources के लिए reach करते हैं एक manual finally-close की बजाय क्योंकि आप जानते हैं ordering guarantee जो यह देता है। जो इस band को top से separate करता है वह concurrent और interface-level side है: synchronized क्या actually lock करता है, volatile क्या करता है और नहीं, और कैसे default-method conflicts resolve होते हैं।",
          "recommendation": "Push करें उन parts में जो code को protect करते हैं जो अन्य threads और अन्य interfaces भी touch करते हैं: क्या synchronized instance method lock करता है बनाम synchronized static method, क्यों volatile counter++ के लिए atomicity नहीं देता visibility के लिए, और कैसे Java आपको एक default-method diamond को manually resolve करने के लिए force करता है। Baeldung का और Java Concurrency in Practice की material Java Memory Model पर दोनों के लिए natural next stop है।"
        },
        "expert": {
          "name": "विशेषज्ञ",
          "desc": "आपने हर section में top score किया — core syntax और types, OOP mechanics और scope, collections और generics, और exceptions, concurrency और idioms। Practically, इसका मतलब है कि आप एक stranger की class को hand किए जाने और explain कर सकते हैं कि एक compile error, एक runtime exception, या एक silently wrong value क्यों होता है, सिर्फ यह नहीं कि syntax क्या कहता है, जो harder है और अधिक valuable skill है। इस level पर language ही rarely limiting factor है; limit आमतौर पर concurrency design या underlying data के shape में है।",
          "recommendation": "रिटर्न्स अब design और diagnosis में हैं: एक thread dump को deadlock मान लेने से पहले read करना, synchronized, java.util.concurrent locks और atomics के बीच एक tradeoff के रूप में choose करना एक default के बजाय, और stream-pipeline design जो intentionally lazy रहता है rather than accidentally। अगर आप एक role के लिए screen किए जा रहे हैं, तो एक concurrency bug describe करें जैसे एक missed happens-before edge या एक ConcurrentModificationException जो आपने production में पाया था rather than Java features को name देना — यह reasoning demonstrate करता है, सिर्फ vocabulary नहीं।"
        }
      },
      "questions": [
        {
          "question": "आप दो String objects बनाते हैं: String a = new String(\"cat\"); String b = new String(\"cat\"); a == b का मूल्यांकन क्या है?",
          "options": [
            {
              "icon": "",
              "label": "true — समान characters वाली String literals हमेशा एक ही object होती हैं"
            },
            {
              "icon": "",
              "label": "true — new String(...) string pool को reuse करता है, तो समान text हमेशा एक object share करता है"
            },
            {
              "icon": "",
              "label": "एक compile error — == का उपयोग String objects की तुलना के लिए नहीं किया जा सकता"
            },
            {
              "icon": "",
              "label": "false — new String(...) हमेशा heap पर एक नया object allocate करता है, तो == दो different references की तुलना करता है भले ही .equals(b) true return करेगा"
            }
          ]
        },
        {
          "question": "Integer x = 100; Integer y = 100; System.out.println(x == y); फिर Integer x2 = 200; Integer y2 = 200; System.out.println(x2 == y2); दोनों lines क्या print करते हैं?",
          "options": [
            {
              "icon": "",
              "label": "true फिर true — autoboxed Integer objects हमेशा cached होते हैं regardless of value"
            },
            {
              "icon": "",
              "label": "false फिर false — Integer objects पर == हमेशा एक reference comparison है, तो equal values कभी match नहीं करते"
            },
            {
              "icon": "",
              "label": "true फिर false, लेकिन सिर्फ क्योंकि 200 एक byte overflow करता है — cache boundary -128..127 से unrelated है"
            },
            {
              "icon": "",
              "label": "true फिर false — autoboxed Integer values -128 से 127 तक cached और shared होते हैं, तो 100 एक object को reuse करता है, लेकिन 200 cache के बाहर falls और दो separate objects में autobox करता है"
            }
          ]
        },
        {
          "question": "int max = Integer.MAX_VALUE; System.out.println(max + 1); क्या होता है?",
          "options": [
            {
              "icon": "",
              "label": "यह integer overflow के लिए एक ArithmeticException फेंकता है"
            },
            {
              "icon": "",
              "label": "यह Integer.MAX_VALUE फिर से print करता है, क्योंकि Java type के maximum पर clamp करता है"
            },
            {
              "icon": "",
              "label": "यह Integer.MIN_VALUE print करता है — int arithmetic silently wrap करता है around on overflow instead of throwing"
            },
            {
              "icon": "",
              "label": "यह एक compile error है — कंपाइलर overflow को ahead of time detect करता है"
            }
          ]
        },
        {
          "question": "System.out.println(0.1 + 0.2 == 0.3); यह क्या print करता है, और क्यों?",
          "options": [
            {
              "icon": "",
              "label": "false — 0.1, 0.2 और 0.3 को binary floating point में exactly represent नहीं किया जा सकता, तो sum rounding error carry करता है जो इसे 0.3 के bit-for-bit equal नहीं बनाता है"
            },
            {
              "icon": "",
              "label": "true — Java double arithmetic को nearest representable decimal में round करता है comparing से पहले"
            },
            {
              "icon": "",
              "label": "true — दो decimals के साथ values के लिए double addition हमेशा exact होता है"
            },
            {
              "icon": "",
              "label": "यह एक exception फेंकता है, क्योंकि == double के लिए Java में defined नहीं है"
            }
          ]
        },
        {
          "question": "एक class दो instance fields को बिना initializer के declare करता है: int count; और Integer total; constructor run होने से पहले, उनके default values क्या हैं?",
          "options": [
            {
              "icon": "",
              "label": "दोनों 0 में default होते हैं, क्योंकि Integer field initialization पर int में autobox करता है"
            },
            {
              "icon": "",
              "label": "count 0 है और total 0 है, पहली बार जब इसे read किया जाता है तो automatically boxed होता है"
            },
            {
              "icon": "",
              "label": "count 0 है और total null है — primitive numeric fields zero में default होते हैं, लेकिन एक uninitialized wrapper reference field किसी अन्य object reference की तरह null में default होता है"
            },
            {
              "icon": "",
              "label": "दोनों explicitly assign किए जाने तक null में default होते हैं, क्योंकि Java के पास कोई implicit numeric defaults नहीं हैं"
            }
          ]
        },
        {
          "question": "एक loop 1000 बार चलता है, हर बार result += \"x\"; को एक String result पर करता है। प्रत्येक iteration के तहत वास्तव में क्या होता है?",
          "options": [
            {
              "icon": "",
              "label": "मौजूदा String object के internal character array को in place extend किया जाता है"
            },
            {
              "icon": "",
              "label": "Java automatically concatenations को batch करता है और केवल एक final String object allocate करता है"
            },
            {
              "icon": "",
              "label": "यह एक single StringBuilder.append() call में compile करता है जो सभी 1000 iterations में shared होता है, कोई extra object per iteration के साथ allocate नहीं होता है"
            },
            {
              "icon": "",
              "label": "एक brand new String object create किया जाता है और result को इसकी ओर reassign किया जाता है — previous String object discarded है, क्योंकि String immutable है और += इसे in place modify नहीं कर सकता है"
            }
          ]
        },
        {
          "question": "final List<String> names = new ArrayList<>(); इनमें से कौन सा सत्य है?",
          "options": [
            {
              "icon": "",
              "label": "names.add(\"Ana\") compile होता है और ठीक काम करता है — final केवल names reference को reassign करने से prevent करता है, न कि object को mutate करने से जिस पर यह points करता है"
            },
            {
              "icon": "",
              "label": "names.add(\"Ana\") एक compile error है, क्योंकि final list को ही unmodifiable बनाता है"
            },
            {
              "icon": "",
              "label": "list concurrent writes के लिए thread-safe है क्योंकि इसे final declare किया गया था"
            },
            {
              "icon": "",
              "label": "एक local variable पर final का कोई effect नहीं है जब तक कि type को भी immutable declare न किया जाए"
            }
          ]
        },
        {
          "question": "int[] a = {1, 2, 3}; int[] b = {1, 2, 3}; System.out.println(a == b); System.out.println(Arrays.equals(a, b)); दोनों lines क्या print करते हैं?",
          "options": [
            {
              "icon": "",
              "label": "false फिर true — == array references की तुलना करता है (दो different array objects), जबकि Arrays.equals elements की तुलना करता है"
            },
            {
              "icon": "",
              "label": "true फिर true — समान contents वाली arrays Java में एक ही object होती हैं"
            },
            {
              "icon": "",
              "label": "false फिर false — Arrays.equals केवल object arrays के लिए काम करता है, न कि primitive int arrays के लिए"
            },
            {
              "icon": "",
              "label": "true फिर false — arrays पर == contents की तुलना करता है, और Arrays.equals redundant है"
            }
          ]
        },
        {
          "question": "void show(Object o) { print(\"Object\"); } void show(String s) { print(\"String\"); } Object ref = \"hello\"; show(ref); कौन सा overload चलता है, और क्यों?",
          "options": [
            {
              "icon": "",
              "label": "show(String) चलता है, क्योंकि Java overload pick करने से पहले object के actual runtime class को inspect करता है"
            },
            {
              "icon": "",
              "label": "show(Object) चलता है — overload resolution variable के declared type को use करके compile time पर decide किया जाता है, न कि object के actual runtime type को जिस पर यह refers करता है"
            },
            {
              "icon": "",
              "label": "यह एक compile error है — Object को जहाँ एक अधिक specific overload exist करता है pass नहीं किया जा सकता"
            },
            {
              "icon": "",
              "label": "दोनों methods चलते हैं, एक बार प्रत्येक, क्योंकि Java हर match को try करके overloads resolve करता है"
            }
          ]
        },
        {
          "question": "Class Base में static void greet() { print(\"Base\"); } होता है। Class Derived Base को extend करता है और static void greet() { print(\"Derived\"); } भी declare करता है। आप लिखते हैं: Base ref = new Derived(); ref.greet(); क्या print होता है?",
          "options": [
            {
              "icon": "",
              "label": "Derived — static methods override होते हैं instance methods की तरह, actual object के runtime type को follow करते हुए"
            },
            {
              "icon": "",
              "label": "यह एक compile error है — static methods को एक instance reference के through call नहीं किया जा सकता"
            },
            {
              "icon": "",
              "label": "Base — static methods polymorphic नहीं हैं; एक को एक reference के through call करना compile time पर reference के declared type से resolve होता है, न कि object के actual type से"
            },
            {
              "icon": "",
              "label": "Base और Derived दोनों print होते हैं, क्योंकि call hidden और hiding versions दोनों को resolve करता है"
            }
          ]
        },
        {
          "question": "एक method के अंदर, आप int count = 0; लिखते हैं; फिर एक lambda से एक अलग method को pass करने से count को reference करने का प्रयास करते हैं। इसे compile करने के लिए count के बारे में क्या सत्य होना चाहिए?",
          "options": [
            {
              "icon": "",
              "label": "count effectively final होना चाहिए — कभी भी अपने initial value के बाद reassign नहीं — क्योंकि एक lambda एक snapshot capture करता है, न कि एक mutable local variable के लिए एक live reference"
            },
            {
              "icon": "",
              "label": "कुछ नहीं — किसी भी local variable को freely read और lambda के अंदर से reassign किया जा सकता है"
            },
            {
              "icon": "",
              "label": "count को volatile declare होना चाहिए ताकि lambda हमेशा इसके latest value को देखे"
            },
            {
              "icon": "",
              "label": "count को एक field होना चाहिए, न कि एक local variable — lambdas locals को capture कर ही नहीं सकते"
            }
          ]
        },
        {
          "question": "void rename(StringBuilder sb) { sb = new StringBuilder(\"new\"); } को StringBuilder original = new StringBuilder(\"old\"); rename(original); के रूप में call किया जाता है। call के बाद original क्या है?",
          "options": [
            {
              "icon": "",
              "label": "\"new\" बन जाता है — objects Java में by reference pass होते हैं, तो parameter को reassign करना caller के variable को भी change करता है"
            },
            {
              "icon": "",
              "label": "\"new\" बन जाता है केवल mutable types जैसे StringBuilder के लिए, लेकिन immutable types के लिए नहीं"
            },
            {
              "icon": "",
              "label": "अभी भी \"old\" है — Java reference को itself by value pass करता है, तो method के अंदर parameter को reassign करना केवल reference की local copy को repoint करता है, caller के original को untouched छोड़ता है"
            },
            {
              "icon": "",
              "label": "एक runtime exception फेंकता है, क्योंकि sb को method के अंदर reassign किया गया था"
            }
          ]
        },
        {
          "question": "एक class में एक static initializer block, एक instance initializer block, और एक constructor होता है, इसी source order में। आप इस class के दो objects को एक के बाद एक create करते हैं। ये किस क्रम में run करते हैं?",
          "options": [
            {
              "icon": "",
              "label": "static block बिल्कुल एक बार चलता है, पहली बार class load होने पर; फिर प्रत्येक object के लिए, instance block चलता है और फिर constructor body चलता है"
            },
            {
              "icon": "",
              "label": "सभी तीन fresh चलते हैं, source order में, हर एक object के लिए"
            },
            {
              "icon": "",
              "label": "constructor प्रत्येक object के लिए पहले चलता है, फिर instance block, फिर static block सबसे अंत में एक बार"
            },
            {
              "icon": "",
              "label": "static block एक बार प्रत्येक object के लिए चलता है, instance block से पहले बिल्कुल"
            }
          ]
        },
        {
          "question": "एक class में void log(String s) और void log(String... args) होता है। आप log(\"hi\") call करते हैं। कौन सा एक चलता है?",
          "options": [
            {
              "icon": "",
              "label": "log(String... args) — varargs overloads हमेशा prefer किए जाते हैं जब दोनों applicable होते हैं"
            },
            {
              "icon": "",
              "label": "यह एक compile error है — call दोनों overloads के बीच ambiguous है"
            },
            {
              "icon": "",
              "label": "log(String s) — जब एक fixed-arity overload exactly match करता है, Java हमेशा इसे एक varargs overload के ऊपर prefer करता है, जो केवल एक last resort के रूप में use होता है"
            },
            {
              "icon": "",
              "label": "जो भी source file में पहले declare किया गया है वह चलता है"
            }
          ]
        },
        {
          "question": "एक constructor की पहली line this(0); को call करता है ताकि same class में एक अन्य constructor को delegate किया जाए। यह कहाँ appear करने के लिए allowed है?",
          "options": [
            {
              "icon": "",
              "label": "constructor body में कहीं भी, जब तक यह object को return किए जाने से पहले चले"
            },
            {
              "icon": "",
              "label": "केवल constructor की बिल्कुल पहली statement के रूप में — this() (या super()) पहली line होनी चाहिए, और एक constructor this() और super() दोनों को call नहीं कर सकता"
            },
            {
              "icon": "",
              "label": "केवल अंतिम statement के रूप में, सभी field initialization complete होने के बाद"
            },
            {
              "icon": "",
              "label": "केवल explicitly delegating के रूप में marked constructors में, एक delegate keyword use करके"
            }
          ]
        },
        {
          "question": "आपको एक list की जरूरत है जिसमें front में extremely often elements insert होंगे, और random-access reads rare हैं। कौन सा बेहतर structural fit है, और क्यों?",
          "options": [
            {
              "icon": "",
              "label": "ArrayList — इसका contiguous backing array हर operation को faster बनाता है, front-insertion भी, एक linked structure की तुलना में"
            },
            {
              "icon": "",
              "label": "वे identically perform करते हैं, क्योंकि दोनों List interface को implement करते हैं same time guarantees के साथ"
            },
            {
              "icon": "",
              "label": "LinkedList — front में inserting O(1) है क्योंकि यह सिर्फ एक node को relink करता है, जबकि ArrayList को हर existing element को एक से ऊपर shift करना होता है, front-insertion को O(n) बनाता है"
            },
            {
              "icon": "",
              "label": "LinkedList, क्योंकि यह O(1) में random access support करता है जबकि ArrayList नहीं"
            }
          ]
        },
        {
          "question": "आप एक plain HashMap में पाँच entries को एक specific order में insert करते हैं, फिर एक for-each loop से इसे iterate करते हैं। entries किस order में बाहर आते हैं?",
          "options": [
            {
              "icon": "",
              "label": "उसी order में जिसमें entries insert किए गए थे, क्योंकि Java maps हमेशा insertion order preserve करते हैं"
            },
            {
              "icon": "",
              "label": "कोई guaranteed order नहीं बिल्कुल — HashMap का iteration order hash bucket placement पर निर्भर करता है, न कि insertion order पर, और runs के बीच भी change हो सकता है; LinkedHashMap वह है जो insertion order preserve करता है"
            },
            {
              "icon": "",
              "label": "key से स्वचालित रूप से sorted, वही तरीका जिस तरह एक TreeMap behaves करता है"
            },
            {
              "icon": "",
              "label": "insertion order की reverse, क्योंकि HashMap internally एक stack use करता है"
            }
          ]
        },
        {
          "question": "एक plain java.util.HashMap एक बार में कितने null keys hold कर सकता है, और कितने null values?",
          "options": [
            {
              "icon": "",
              "label": "किसी भी Map implementation में कभी कोई null keys और null values allowed नहीं हैं"
            },
            {
              "icon": "",
              "label": "अधिकतम एक null key, और कोई भी संख्या में null values — HashMap एक single null key allow करता है, Hashtable के विपरीत जो दोनों को permit नहीं करता"
            },
            {
              "icon": "",
              "label": "unlimited null keys और unlimited null values, क्योंकि null को किसी अन्य key की तरह treat किया जाता है"
            },
            {
              "icon": "",
              "label": "अधिकतम एक null key और एक null value, दोनों एक पर capped हैं"
            }
          ]
        },
        {
          "question": "आप एक List को एक for-each loop से iterate करते हैं और loop body के अंदर से सीधे list पर list.remove(item) को call करते हैं, कुछ लेकिन सभी elements नहीं। क्या होता है?",
          "options": [
            {
              "icon": "",
              "label": "यह सही तरीके से काम करता है और बिल्कुल intended elements को remove करता है"
            },
            {
              "icon": "",
              "label": "यह silently उस element को skip करता है जो removed के बाद आता है, लेकिन अन्यथा error के बिना complete होता है"
            },
            {
              "icon": "",
              "label": "यह IndexOutOfBoundsException फेंकता है जब loop list के old size को reach करता है"
            },
            {
              "icon": "",
              "label": "यह ConcurrentModificationException फेंकता है — एक implicit iterator इसे चलाते समय सीधे list को structure को modify करना detect और reject किया जाता है; Iterator.remove() को use किया जाना चाहिए"
            }
          ]
        },
        {
          "question": "Runtime पर, एक List<String> list दिया हुआ, आप reflection या instanceof के माध्यम से इसके generic type parameter के बारे में वास्तव में क्या determine कर सकते हैं?",
          "options": [
            {
              "icon": "",
              "label": "आप list.getElementType() को call करके runtime पर String.class retrieve कर सकते हैं"
            },
            {
              "icon": "",
              "label": "instanceof List<String> compile करता है और सही तरीके से element type को check करता है"
            },
            {
              "icon": "",
              "label": "JVM type parameter को hidden metadata के रूप में store करता है list.getGenericType() के माध्यम से accessible है"
            },
            {
              "icon": "",
              "label": "कुछ नहीं — generic type information compile time पर erased होती है, तो runtime पर object सिर्फ एक List है, और कोई तरीका नहीं है यह recover करने के लिए कि यह List<String> या List<Integer> के रूप में declare किया गया था"
            }
          ]
        },
        {
          "question": "switch (day) { case 1: case 2: print(\"Weekday\"); break; case 6: print(\"Saturday\"); case 7: print(\"Sunday\"); break; default: print(\"?\"); } अगर day 6 है, तो क्या print होता है?",
          "options": [
            {
              "icon": "",
              "label": "केवल Saturday — switch में प्रत्येक case block हमेशा अपने statement के बाद print को stop करता है"
            },
            {
              "icon": "",
              "label": "केवल Sunday — matching case 6 पर शुरू होती है लेकिन केवल अंतिम matching label break से पहले execute होता है"
            },
            {
              "icon": "",
              "label": "कुछ नहीं print होता है, क्योंकि day 6 के पास सीधे नीचे अपने break के साथ कोई matching case नहीं है"
            },
            {
              "icon": "",
              "label": "Saturday फिर Sunday — case 6 के पास कोई break नहीं है, तो execution अगले case के code में fall through करता है following break को hit करने से पहले"
            }
          ]
        },
        {
          "question": "एक Product class को एक single, obvious \"natural\" sort order by price की जरूरत है, साथ ही अलग-अलग जगहों पर code में by name या by stock level से भी sort करने की ability है। कौन सा combination सही design है?",
          "options": [
            {
              "icon": "",
              "label": "Comparable<Product> को तीन अलग बार implement करें, एक per ordering, और caller को choose करने दें कि कौन सा compareTo चले"
            },
            {
              "icon": "",
              "label": "natural price ordering के लिए Comparable<Product> implement करें, और अलग-अलग Comparator<Product> instances लिखें name और stock-level orderings के लिए जो code में अन्यत्र use होते हैं"
            },
            {
              "icon": "",
              "label": "हर ordering के लिए केवल Comparator use करें, price सहित, क्योंकि Comparable का यहाँ कोई advantage नहीं है"
            },
            {
              "icon": "",
              "label": "केवल Comparable use करें तीन overloaded compareTo methods को add करके, एक per ordering"
            }
          ]
        },
        {
          "question": "एक method new FileReader(path) को call करता है, जो IOException को declare करता है throws। IOException Exception को extend करता है, RuntimeException को नहीं। यह compile करने के लिए आपको क्या करना चाहिए?",
          "options": [
            {
              "icon": "",
              "label": "कुछ नहीं — कंपाइलर केवल उन exceptions के लिए यह enforce करता है जो RuntimeException को extend करते हैं"
            },
            {
              "icon": "",
              "label": "या तो एक try/catch में IOException को catch करें या अपने method पर throw IOException declare करें — checked exceptions को explicitly handle या propagate किया जाना चाहिए, unchecked RuntimeException subclasses के विपरीत"
            },
            {
              "icon": "",
              "label": "call को RuntimeException के लिए try/catch में wrap करें, क्योंकि IOException को modern Java में automatically unchecked किया जाता है"
            },
            {
              "icon": "",
              "label": "method को static के रूप में declare करें — static methods checked exception handling से exempt हैं"
            }
          ]
        },
        {
          "question": "try (Resource a = new Resource(\"A\"); Resource b = new Resource(\"B\")) { ... } AutoCloseable को implement करने वाले दो resources use करता है। अगर try block normally finish होता है, तो किस order में वे close होते हैं?",
          "options": [
            {
              "icon": "",
              "label": "A पहले close होता है, फिर B, declaration order को match करते हुए"
            },
            {
              "icon": "",
              "label": "B पहले close होता है, फिर A — try-with-resources resources को उनके declaration के order के reverse में close करता है"
            },
            {
              "icon": "",
              "label": "दोनों एक साथ close होते हैं, क्योंकि try-with-resources cleanup को parallelize करता है"
            },
            {
              "icon": "",
              "label": "केवल B को automatically close किया जाता है — A को अभी भी एक finally block में manually close किया जाना चाहिए"
            }
          ]
        },
        {
          "question": "int getValue() { try { return 1; } finally { return 2; } } getValue() को call करने पर क्या return होता है?",
          "options": [
            {
              "icon": "",
              "label": "1 — try block का return value पहले से ही committed होता है इसलिए finally run होने से पहले, तो finally इसे change नहीं कर सकता"
            },
            {
              "icon": "",
              "label": "यह runtime पर एक exception फेंकता है, क्योंकि एक method दो जगहों से return नहीं कर सकता"
            },
            {
              "icon": "",
              "label": "2 — एक return statement finally के अंदर किसी भी return को override और replace करता है जो पहले से ही try block से progress में होता है, value 1 को completely discard करता है"
            },
            {
              "icon": "",
              "label": "यह एक compile error है — finally को एक return statement contain करने के लिए allowed नहीं है"
            }
          ]
        },
        {
          "question": "try { ... } catch (IOException e) { ... } catch (FileNotFoundException e) { ... }, और FileNotFoundException IOException को extend करता है। जब आप इसे compile करने का प्रयास करते हैं तो क्या होता है?",
          "options": [
            {
              "icon": "",
              "label": "एक compile error — FileNotFoundException catch block unreachable है क्योंकि पहला, अधिक general IOException catch block पहले से ही हर FileNotFoundException को match करता है"
            },
            {
              "icon": "",
              "label": "यह compile करता है, और अधिक specific FileNotFoundException block चलता है जब भी वह exact type फेंका जाता है"
            },
            {
              "icon": "",
              "label": "यह compile करता है, और एक FileNotFoundException के लिए दोनों catch blocks order में चलते हैं"
            },
            {
              "icon": "",
              "label": "यह compile time पर ठीक है लेकिन एक runtime error फेंकता है पहली बार एक FileNotFoundException वास्तव में occur होता है"
            }
          ]
        },
        {
          "question": "एक class के पास एक synchronized instance method process() है और एक synchronized static method configure() है। विशेष रूप से, प्रत्येक क्या lock करता है?",
          "options": [
            {
              "icon": "",
              "label": "process() specific object instance के monitor को lock करता है जिस पर यह call किया जाता है, जबकि configure() Class object के monitor को lock करता है — हर instance द्वारा shared"
            },
            {
              "icon": "",
              "label": "दोनों पूरे JVM के लिए एक single global lock को lock करते हैं, instance या class के बावजूद"
            },
            {
              "icon": "",
              "label": "process() Class object को lock करता है, और configure() जो भी instance happen to call करता है उसे lock करता है"
            },
            {
              "icon": "",
              "label": "न ही actually कुछ lock करता है जब तक कि एक synchronized block भी method body के अंदर use न हो"
            }
          ]
        },
        {
          "question": "एक field को volatile int counter = 0; के रूप में declare किया जाता है, और multiple threads इसे concurrently counter++ पर चलाते हैं। क्या volatile lost updates को prevent करता है यहाँ?",
          "options": [
            {
              "icon": "",
              "label": "हाँ — volatile हर operation को field पर atomic बनाता है, increments सहित"
            },
            {
              "icon": "",
              "label": "नहीं — volatile केवल यह guarantee करता है कि reads threads पर latest write को देखते हैं (visibility); counter++ एक read-modify-write है multiple steps के साथ, और volatile इन steps को atomic बनाने के लिए कुछ नहीं करता है"
            },
            {
              "icon": "",
              "label": "हाँ, लेकिन केवल int और long fields के लिए specifically, कैसे JVM 64-bit values को handle करता है के कारण"
            },
            {
              "icon": "",
              "label": "नहीं, और volatile int जैसी primitive types के लिए visibility को guarantee करने में भी fail करता है"
            }
          ]
        },
        {
          "question": "Interface A और interface B प्रत्येक एक default method describe() को declare करते हैं। एक class दोनों A और B को implement करता है और describe() को स्वयं override नहीं करता। क्या होता है?",
          "options": [
            {
              "icon": "",
              "label": "कंपाइलर automatically interface A का version pick करता है, क्योंकि यह implements clause में पहले listed है"
            },
            {
              "icon": "",
              "label": "दोनों versions चलते हैं, एक के बाद एक, जब भी describe() call किया जाता है"
            },
            {
              "icon": "",
              "label": "यह compile time पर ठीक है, लेकिन AmbiguousMethodException फेंकता है जब पहली बार describe() को call किया जाता है"
            },
            {
              "icon": "",
              "label": "एक compile error — जब दो interfaces एक ही default method contribute करते हैं, implementing class को इसे स्वयं override करना चाहिए ambiguity को resolve करने के लिए, क्योंकि Java guess नहीं करेगा कि आप कौन सा मतलब करते हैं"
            }
          ]
        },
        {
          "question": "list.stream().filter(x -> x > 0).map(x -> x * 2); लिखा जाता है लेकिन result को कभी .collect() या .forEach() जैसे एक terminal operation को assign नहीं किया जाता। जब यह line execute होती है तो वास्तव में क्या होता है?",
          "options": [
            {
              "icon": "",
              "label": "list के elements के साथ कुछ नहीं होता बिल्कुल — filter और map lazy intermediate operations हैं जो केवल एक pipeline description build करते हैं; एक terminal operation के बिना, यह pipeline कभी भी actually run नहीं होती है"
            },
            {
              "icon": "",
              "label": "हर element तुरंत filter और map किया जाता है, ठीक जैसे अगर एक terminal operation call किया जाता"
            },
            {
              "icon": "",
              "label": "केवल filter तुरंत चलता है; map तब तक deferred है जब तक एक terminal operation appear न हो"
            },
            {
              "icon": "",
              "label": "यह एक IllegalStateException फेंकता है, क्योंकि एक stream pipeline के लिए एक terminal operation require है compile के लिए"
            }
          ]
        }
      ],
      "optionOrderVersion": "0154f9576054ad6f"
    }
  }
}
