StringBuffer Class: Mutable, Synchronized and Thread-Safe Notes in Hindi & English : StringBuffer क्लास: परिवर्तनीय, सिंक्रोनाइज़्ड और थ्रेड-सेफ और 20 महत्वपूर्ण MCQ प्रश्न (Rajasthan IT Exam)

Post a Comment

PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम StringBuffer Class: Mutable, Synchronized and Thread-Safe (StringBuffer क्लास: परिवर्तनीय, सिंक्रोनाइज़्ड और थ्रेड-सेफ) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।

Overview: java.lang.StringBuffer is a mutable, synchronized, and thread-safe character sequence that modifies its internal buffer in-place without spawning intermediate String garbage. It defaults to a 16-character capacity, dynamically expanding via (oldCapacity * 2) + 2 when exceeded.

अध्याय सार: java.lang.StringBuffer एक परिवर्तनीय (mutable), सिंक्रोनाइज़्ड और थ्रेड-सेफ क्लास है जो बिना अस्थायी स्ट्रिंग ऑब्जेक्ट बनाए अपने आंतरिक बफर को सीधे बदलती है। इसकी डिफ़ॉल्ट क्षमता 16 कैरेक्टर्स होती है, जो भरने पर (oldCapacity * 2) + 2 के सूत्र से बढ़ती है।

StringBuffer Class: Mutable, Synchronized and Thread-Safe: Detailed Notes & Architecture (StringBuffer क्लास: परिवर्तनीय, सिंक्रोनाइज़्ड और थ्रेड-सेफ)

1. Mutability and Inheritance Hierarchy of StringBuffer (StringBuffer की परिवर्तनीयता और इनहेरिटेंस पदानुक्रम)

[EN] Declared as public final class StringBuffer extends AbstractStringBuilder implements Serializable, Comparable<StringBuffer>, CharSequence (Comparable added in Java 11), it allows in-place string editing. Unlike String, calling append(), insert(), delete(), replace(), or reverse() mutates the existing StringBuffer object directly and returns this for convenient method chaining. Because it is mutable, StringBuffer objects are never stored in the String Constant Pool and are always created via the new operator on the regular Heap. Just like String, Java 9+ StringBuffer uses Compact Strings internally (byte[] value + coder) for memory efficiency.

[HI] public final class StringBuffer के रूप में घोषित यह क्लास AbstractStringBuilder को एक्सटेंड तथा Serializable, Comparable<StringBuffer> (जावा 11+) और CharSequence को इम्प्लीमेंट करती है। String के विपरीत, append(), insert(), delete(), replace() या reverse() कॉल करने पर वही ऑब्जेक्ट बदलता है और मेथड चेनिंग हेतु this लौटता है। परिवर्तनीय होने के कारण StringBuffer कभी SCP में नहीं जाता, बल्कि हमेशा new द्वारा हीप मेमोरी में बनता है। जावा 9+ में यह भी मेमोरी दक्षता के लिए कॉम्पैक्ट स्ट्रिंग्स (byte[] value + coder) का उपयोग करता है।

2. Synchronization and Thread Safety Guarantees (सिंक्रोनाइज़ेशन और थ्रेड-सेफ्टी की गारंटी)

[EN] StringBuffer achieves thread safety because almost all its mutating and inspecting public methods—such as append, insert, delete, charAt, length, and reverse—are marked synchronized. When one thread invokes sb.append("X"), it acquires the intrinsic monitor lock on that sb instance, blocking concurrent threads until the operation finishes safely. Note that since Java 5, a StringBuffer also caches a toStringCache array/value cleared upon mutation to speed up repeated toString() calls. Because acquiring locks introduces minor overhead in single-threaded programs, Java 5 introduced StringBuilder as an unsynchronized drop-in replacement.

[HI] StringBuffer थ्रेड-सेफ्टी इसलिए देता है क्योंकि इसके लगभग सभी प्रमुख मेथड्स (append, insert, delete, charAt, length, reverse आदि) synchronized कीवर्ड से सुरक्षित हैं। जब एक थ्रेड sb.append("X") चलाता है, तो वह उस sb ऑब्जेक्ट का मॉनिटर लॉक प्राप्त करता है, जिससे अन्य थ्रेड्स डेटा खराब नहीं कर पाते। जावा 5 से StringBuffer ने बार-बार toString() कॉल तेज़ करने हेतु आंतरिक कैशिंग भी जोड़ी है जो किसी बदलाव पर साफ़ हो जाती है। सिंगल-थ्रेडेड कोड में लॉक ओवरहेड से बचने के लिए जावा 5 में बिना सिंक्रोनाइज़ेशन वाला StringBuilder पेश किया गया।

3. Constructors, Capacity Formula, and Growth Rules (कंस्ट्रक्टर्स, कैपेसिटी सूत्र और बफर विस्तार नियम)

[EN] StringBuffer distinguishes length() (current character count) from capacity() (allocated buffer size). The no-arg constructor new StringBuffer() allocates a default capacity of 16 characters, while new StringBuffer(int cap) sets a custom initial capacity. Crucially, new StringBuffer(String str) allocates capacity equal to 16 + str.length() (so new StringBuffer("Java") starts with length 4 and capacity 20). When an append exceeds current capacity, the buffer expands automatically to (oldCapacity * 2) + 2—or the exact minimum required length if even larger than (oldCapacity * 2) + 2.

[HI] StringBuffer में length() (वर्तमान अक्षर संख्या) और capacity() (आवंटित बफर आकार) दो अलग मान होते हैं। बिना पैरामीटर वाला new StringBuffer() डिफ़ॉल्ट 16 क्षमता बनाता है, जबकि new StringBuffer(int cap) मनचाही प्रारंभिक क्षमता सेट करता है। महत्वपूर्ण बात यह है कि new StringBuffer(String str) कुल 16 + str.length() की क्षमता आवंटित करता है (जैसे "Java" के लिए लंबाई 4 और क्षमता 20)। जब डेटा क्षमता से अधिक होता है, तो नई क्षमता (oldCapacity * 2) + 2 हो जाती है (या यदि आवश्यक न्यूनतम आकार उससे भी बड़ा हो, तो वह न्यूनतम आकार)।

4. Key Methods and the equals() Trap (प्रमुख मेथड्स और equals() का महत्वपूर्ण अपवाद)

[EN] Essential mutating methods include append(...) (overloaded for primitives, Strings, chars, Objects), insert(int offset, ...), delete(int start, int end), deleteCharAt(int index), and reverse(). setLength(int newLength) can truncate existing characters or pad trailing '\u0000' NUL characters, while ensureCapacity(int minCap) pre-grows the buffer to avoid repeated reallocations. A famous exam trap: StringBuffer does NOT override Object.equals() or Object.hashCode()! Therefore, new StringBuffer("IA").equals(new StringBuffer("IA")) returns false (reference comparison ==), whereas compareTo() (Java 11+) compares content lexicographically.

[HI] मुख्य मेथड्स में append(), insert(offset, ...), delete(start, end), deleteCharAt(index) और reverse() शामिल हैं। setLength() बफर को छोटा या '\u0000' से बड़ा कर सकता है, और ensureCapacity() पहले से बफर बढ़ाकर बार-बार रीअलोकेशन रोकता है। एक प्रसिद्ध परीक्षा ट्रैप: StringBuffer क्लास Object.equals() और hashCode() को ओवरराइड नहीं करती! इसलिए new StringBuffer("IA").equals(new StringBuffer("IA")) हमेशा false (केवल रेफरेंस तुलना) लौटाता है, जबकि जावा 11+ का compareTo() कंटेंट मिलाता है।

Syntax, Formula & Technical Example (StringBuffer Class: Mutable, Synchronized and Thread-Safe)

StringBuffer sb = new StringBuffer("Java");
System.out.println(sb.capacity()); // 20 (16 + 4)
sb.append(" Exam");
sb.insert(4, " 21");
sb.replace(0, 4, "Core");
sb.reverse();
System.out.println(sb.toString());

StringBuffer Class: Mutable, Synchronized and Thread-Safe Quick Reference & Comparison Table

Class / PropertyTechnical SpecificationExam Fact
new StringBuffer()Default initial capacity of 16 charsnew StringBuffer(str) starts at 16 + str.length()
Capacity ExpansionNew capacity = (oldCapacity * 2) + 2Or required minimum length if larger than formula
Thread SafetyPublic methods use synchronized locksSafe for multi-threaded shared mutation; slower than StringBuilder
equals() BehaviorInherits Object.equals() (checks ==)Two separate StringBuffers with identical text return false

StringBuffer Class: Mutable, Synchronized and Thread-Safe Top 20 Bilingual MCQs with Answers

Q1. What is the default initial capacity of an empty StringBuffer created with new StringBuffer()?

(new StringBuffer() द्वारा बनाए गए खाली StringBuffer की डिफ़ॉल्ट प्रारंभिक क्षमता (capacity) कितनी होती है?)

(A) 16

(B) 32

(C) 0

(D) 8

Correct Answer: (A)

[EN] The parameterless constructor allocates a 16-character backing buffer by default.

[HI] बिना पैरामीटर वाला StringBuffer कंस्ट्रक्टर डिफ़ॉल्ट रूप से 16 कैरेक्टर्स का बफर आवंटित करता है।

Q2. What is the initial capacity returned by new StringBuffer("Computer").capacity()?

(new StringBuffer("Computer").capacity() का प्रारंभिक मान क्या होगा?)

(A) 18

(B) 8

(C) 24

(D) 16

Correct Answer: (C)

[EN] StringBuffer(String str) initializes capacity to 16 + str.length(); "Computer" has 8 letters, so 16 + 8 = 24.

[HI] StringBuffer(String) क्षमता को 16 + str.length() रखता है; "Computer" में 8 अक्षर हैं, अतः 16 + 8 = 24 होगा।

Q3. When a StringBuffer with capacity 16 needs to hold 20 characters, what does its new capacity become?

(जब 16 क्षमता वाले StringBuffer में 20 कैरेक्टर रखे जाते हैं, तो उसकी नई क्षमता कितनी हो जाती है?)

(A) 34

(B) 20

(C) 40

(D) 32

Correct Answer: (A)

[EN] Exceeding capacity triggers growth using (oldCapacity * 2) + 2, which calculates (16 * 2) + 2 = 34.

[HI] क्षमता पार होने पर बफर (oldCapacity * 2) + 2 के अनुसार बढ़ता है: (16 * 2) + 2 = 34।

Q4. Why is StringBuffer considered thread-safe in Java?

(जावा में StringBuffer को थ्रेड-सेफ क्यों माना जाता है?)

(A) It resides inside the String Constant Pool

(B) It is an immutable class like String

(C) It automatically copies itself per thread via ThreadLocal

(D) Its public methods are declared synchronized, locking the instance across threads

Correct Answer: (D)

[EN] Methods such as append(), insert(), delete(), and reverse() use the synchronized modifier to serialize concurrent access.

[HI] append(), insert(), delete() और reverse() जैसे मेथड्स के synchronized होने से एक समय में केवल एक ही थ्रेड इन्हें बदल सकता है।

Q5. What does new StringBuffer("IA").equals(new StringBuffer("IA")) evaluate to?

(new StringBuffer("IA").equals(new StringBuffer("IA")) का परिणाम क्या होगा?)

(A) Compile-time error

(B) true

(C) false

(D) Throws UnsupportedOperationException

Correct Answer: (C)

[EN] StringBuffer does not override Object.equals(), so equals() performs == reference comparison and returns false for distinct instances.

[HI] StringBuffer ने Object.equals() को ओवरराइड नहीं किया है, इसलिए अलग ऑब्जेक्ट्स पर यह == की तरह false लौटाता है।

Q6. How does StringBuilder (introduced in Java 5) differ from StringBuffer?

(जावा 5 में पेश किया गया StringBuilder किस प्रकार StringBuffer से भिन्न है?)

(A) StringBuilder has a default capacity of 32

(B) StringBuilder is unsynchronized and faster for single-threaded usage, while sharing the same API

(C) StringBuilder stores strings in SCP

(D) StringBuilder is immutable

Correct Answer: (B)

[EN] StringBuilder drops synchronization locks for higher single-thread throughput while mirroring StringBuffer's methods.

[HI] StringBuilder में StringBuffer जैसा ही API है, परंतु सिंक्रोनाइज़ेशन लॉक न होने से यह सिंगल-थ्रेड में तेज़ काम करता है।

Q7. What does StringBuffer sb = new StringBuffer("ABCDE"); sb.delete(1, 3); leave inside sb?

(StringBuffer sb = new StringBuffer("ABCDE"); sb.delete(1, 3); चलाने के बाद sb में क्या बचेगा?)

(A) "CDE"

(B) "ABDE"

(C) "AE"

(D) "ADE"

Correct Answer: (D)

[EN] delete(start, end) removes characters from inclusive start (1='B') up to exclusive end (3='D'), deleting 'B' and 'C' to leave "ADE".

[HI] delete(1, 3) इंडेक्स 1 ('B') से इंडेक्स 2 ('C') तक हटाता है (इंडेक्स 3 बहिष्कृत है), इसलिए "ADE" बचता है।

Q8. Which StringBuffer method reverses the character sequence in-place without creating a new StringBuffer?

(StringBuffer का कौन-सा मेथड बिना नया ऑब्जेक्ट बनाए कैरेक्टर अनुक्रम को इन-प्लेस उल्टा (reverse) कर देता है?)

(A) mirror()

(B) reverse()

(C) invert()

(D) flip()

Correct Answer: (B)

[EN] sb.reverse() reverses the characters directly within the internal buffer and returns a reference to sb.

[HI] sb.reverse() आंतरिक बफर के भीतर ही कैरेक्टर्स का क्रम पलट देता है और उसी sb का रेफरेंस लौटाता है।

Q9. What happens if a StringBuffer with capacity 16 appends a 50-character string in a single append() call?

(यदि 16 क्षमता वाले StringBuffer में एक ही append() कॉल से 50 कैरेक्टर की स्ट्रिंग जोड़ी जाए तो नई क्षमता कितनी होगी?)

(A) 34

(B) 68

(C) Throws BufferOverflowException

(D) 50 (minimum required length exceeds (16*2)+2 = 34)

Correct Answer: (D)

[EN] If the required minimum capacity exceeds (oldCapacity * 2) + 2, StringBuffer directly allocates the required minimum (50).

[HI] यदि आवश्यक न्यूनतम लंबाई (16*2)+2 = 34 से भी बड़ी हो, तो StringBuffer सीधे आवश्यक न्यूनतम क्षमता 50 आवंटित करता है।

Q10. Can a StringBuffer object be stored in the String Constant Pool?

(क्या किसी StringBuffer ऑब्जेक्ट को स्ट्रिंग कांस्टेंट पूल (SCP) में संग्रहीत किया जा सकता है?)

(A) Yes, by calling sb.intern()

(B) No, StringBuffer is mutable and has no intern() mechanism for SCP

(C) Yes, by assigning StringBuffer sb = "text";

(D) Yes, since Java 9 Compact Strings

Correct Answer: (B)

[EN] Only immutable String literals belong in SCP; mutable StringBuffer instances always reside on the normal Heap.

[HI] SCP केवल अपरिवर्तनीय String लिटरल्स के लिए है; परिवर्तनीय StringBuffer हमेशा सामान्य हीप मेमोरी में बनते हैं।

Q11. What is printed by: StringBuffer sb = new StringBuffer("Java"); sb.insert(2, "XY"); System.out.print(sb);?

(StringBuffer sb = new StringBuffer("Java"); sb.insert(2, "XY"); System.out.print(sb); क्या प्रिंट करेगा?)

(A) JXYava

(B) JavXYa

(C) XYJava

(D) JaXYva

Correct Answer: (D)

[EN] insert(2, "XY") inserts "XY" right before index 2 ('v'), shifting "va" right to form "JaXYva".

[HI] insert(2, "XY") इंडेक्स 2 ('v') से ठीक पहले "XY" जोड़ देता है, जिससे "JaXYva" बनता है।

Q12. Which class serves as the package-private parent class of both StringBuffer and StringBuilder?

(StringBuffer और StringBuilder दोनों की पैकेज-प्राइवेट पैरेंट क्लास कौन-सी है?)

(A) AbstractStringBuilder

(B) MutableSequence

(C) String

(D) CharBuffer

Correct Answer: (A)

[EN] Both StringBuffer and StringBuilder extend java.lang.AbstractStringBuilder, sharing buffer growth and manipulation logic.

[HI] StringBuffer और StringBuilder दोनों java.lang.AbstractStringBuilder को एक्सटेंड करते हैं।

Q13. What happens if you write StringBuffer sb = "Hello"; in Java?

(जावा में StringBuffer sb = "Hello"; लिखने पर क्या होगा?)

(A) Places "Hello" in StringBuffer pool

(B) Compile-time incompatible types error: String cannot be converted to StringBuffer

(C) Throws ClassCastException at runtime

(D) Creates a StringBuffer with capacity 21

Correct Answer: (B)

[EN] String literals always produce String instances; StringBuffer must be constructed via new StringBuffer("Hello").

[HI] स्ट्रिंग लिटरल हमेशा String टाइप का होता है, इसलिए StringBuffer बनाने के लिए new StringBuffer("Hello") लिखना अनिवार्य है।

Q14. Which of the following is NOT true about java.lang.StringBuffer?

(java.lang.StringBuffer के बारे में निम्न में से कौन-सा कथन सत्य नहीं है?)

(A) StringBuffer is a final class that cannot be subclassed

(B) StringBuffer supports method chaining because mutators return this

(C) StringBuffer overrides Object.equals() to compare character content cleanly

(D) StringBuffer is slower than StringBuilder in single-threaded loops due to synchronization

Correct Answer: (C)

[EN] Neither StringBuffer nor StringBuilder overrides Object.equals(); you must call toString().equals(...) or compareTo() (Java 11+).

[HI] StringBuffer और StringBuilder में से कोई भी Object.equals() को ओवरराइड नहीं करता; कंटेंट मिलान के लिए toString().equals() चाहिए।

Q15. What does sb.setLength(2) do when sb holds "Rajasthan"?

(यदि sb में "Rajasthan" हो, तो sb.setLength(2) चलाने से क्या होगा?)

(A) Shrinks capacity to 2 and throws away remaining capacity

(B) Pads spaces to the left

(C) Throws IllegalArgumentException

(D) Truncates sb to "Ra" without shrinking its allocated capacity

Correct Answer: (D)

[EN] setLength(2) updates the logical character count to 2 ("Ra"), keeping existing buffer capacity intact.

[HI] setLength(2) तार्किक लंबाई को 2 ('Ra') तक काट देता है, जबकि आवंटित बफर क्षमता पहले जैसी बनी रहती है।

Q16. What happens when calling new StringBuffer(-5)?

(new StringBuffer(-5) कॉल करने पर क्या होता है?)

(A) Defaults capacity to 16

(B) Throws NegativeArraySizeException at runtime

(C) Creates a capacity-5 buffer

(D) Compile-time syntax error

Correct Answer: (B)

[EN] Passing a negative integer attempts to allocate a negative-sized backing array, raising NegativeArraySizeException.

[HI] ऋणात्मक क्षमता पास करने से आंतरिक एरे का आकार नकारात्मक होने के कारण रनटाइम पर NegativeArraySizeException आता है।

Q17. Within StringBuffer Class: Mutable, Synchronized and Thread-Safe, which class / property directly maps to: "Default initial capacity of 16 chars"?

(StringBuffer Class: Mutable, Synchronized and Thread-Safe में कौन सा Class / Property सीधे "Default initial capacity of 16 chars" से संबंधित है?)

(A) new StringBuffer()

(B) Thread Safety

(C) Capacity Expansion

(D) equals() Behavior

Correct Answer: (A)

[EN] In StringBuffer Class: Mutable, Synchronized and Thread-Safe, 'new StringBuffer()' handles 'Default initial capacity of 16 chars' (new StringBuffer(str) starts at 16 + str.length()).

[HI] StringBuffer Class: Mutable, Synchronized and Thread-Safe में 'new StringBuffer()' का कार्य/विवरण 'Default initial capacity of 16 chars' (new StringBuffer(str) starts at 16 + str.length()) है।

Q18. Which option accurately describes 'Capacity Expansion' in StringBuffer Class: Mutable, Synchronized and Thread-Safe?

(StringBuffer Class: Mutable, Synchronized and Thread-Safe के संदर्भ में 'Capacity Expansion' की सही विशेषता कौन सी है?)

(A) Inherits Object.equals() (checks ==)

(B) Public methods use synchronized locks

(C) New capacity = (oldCapacity * 2) + 2

(D) Default initial capacity of 16 chars

Correct Answer: (C)

[EN] 'Capacity Expansion' provides 'New capacity = (oldCapacity * 2) + 2' — key point: Or required minimum length if larger than formula.

[HI] 'Capacity Expansion' का मुख्य विवरण 'New capacity = (oldCapacity * 2) + 2' है (Or required minimum length if larger than formula)।

Q19. In StringBuffer Class: Mutable, Synchronized and Thread-Safe, identify the correct parameter for the specification: "Public methods use synchronized locks".

(StringBuffer Class: Mutable, Synchronized and Thread-Safe में "Public methods use synchronized locks" विवरण किस विकल्प के लिए सही है?)

(A) Thread Safety

(B) Capacity Expansion

(C) new StringBuffer()

(D) equals() Behavior

Correct Answer: (A)

[EN] 'Thread Safety' corresponds to 'Public methods use synchronized locks' (Safe for multi-threaded shared mutation; slower than StringBuilder).

[HI] 'Thread Safety' का संबंध 'Public methods use synchronized locks' (Safe for multi-threaded shared mutation; slower than StringBuilder) से है।

Q20. Considering StringBuffer Class: Mutable, Synchronized and Thread-Safe, what key behavior defines 'equals() Behavior'?

(StringBuffer Class: Mutable, Synchronized and Thread-Safe में 'equals() Behavior' की मुख्य भूमिका या मान क्या है?)

(A) Inherits Object.equals() (checks ==)

(B) New capacity = (oldCapacity * 2) + 2

(C) Public methods use synchronized locks

(D) Default initial capacity of 16 chars

Correct Answer: (A)

[EN] 'equals() Behavior' represents 'Inherits Object.equals() (checks ==)' (Two separate StringBuffers with identical text return false).

[HI] 'equals() Behavior' का अर्थ/मान 'Inherits Object.equals() (checks ==)' है (Two separate StringBuffers with identical text return false)।

StringBuffer Class: Mutable, Synchronized and Thread-Safe — Exam FAQs

Q1: When should I choose StringBuffer over StringBuilder and String?

मुझे String या StringBuilder के बजाय StringBuffer कब चुनना चाहिए?

[EN] Use String for fixed/immutable text, StringBuilder when building or modifying text in a single thread (or local variable), and StringBuffer only when multiple threads concurrently mutate the same shared buffer.

[HI] स्थिर टेक्स्ट के लिए String, सिंगल-थ्रेड बदलाव या लोकल वेरिएबल के लिए StringBuilder, और जब एकाधिक थ्रेड्स एक ही साझा बफर को एक साथ बदलें तब StringBuffer चुनें।

Q2: Why did Java 11 add Comparable<StringBuffer> to StringBuffer without overriding equals()?

जावा 11 ने StringBuffer में equals() ओवरराइड किए बिना Comparable<StringBuffer> क्यों जोड़ा?

[EN] Overriding equals() after 20+ years would break backward compatibility with existing code expecting identity equality, whereas adding compareTo() gave safe lexicographical comparison.

[HI] दशकों बाद equals() बदलने से पुराने कोड की बैकवर्ड कम्पैटिबिलिटी टूट सकती थी, जबकि नया compareTo() जोड़ने से बिना पुराना व्यवहार तोड़े कंटेंट तुलना संभव हो गई।

Q3: Does sb.toString() return the internal array directly or a new String copy?

क्या sb.toString() आंतरिक एरे को सीधे लौटाता है या नई String कॉपी बनाता है?

[EN] It returns a new immutable String object built from the current buffer contents (caching the result internally until sb is next modified) so future edits to sb never mutate the returned String.

[HI] यह वर्तमान बफर के डेटा से एक नया अपरिवर्तनीय String ऑब्जेक्ट बनाकर लौटाता है (अगले बदलाव तक कैश रखते हुए), ताकि बाद में sb बदलने पर लौटाई गई String न बदले।

Newest Older

Related Posts

  • Loading related posts...

Post a Comment

Search Topic Notes & 20 MCQs (Hindi / English)