What do string manipulation functions return in Java?
AA newly allocated copy
BThe modified original
CAn unchecked pointer
DA deleted byte buffer
Answer & Solution
Correct answer: A. A newly allocated copy
Due to immutability, Java string manipulations return a freshly allocated copy.
Keep practising String Handling and Wrapper Classes
Browse all String Handling and Wrapper Classes questions for ICSE Class 10, or explore more Computer Applications topics.
Related questions
Match Lewis marks:
1. Marks: p. Symbols
2. Str: q. Initial
3. Rules: r. DeriveMatch Unicode units:
1. Unit: p. Fixed
2. Char: q. Composing
3. UTF8: r. PreferredMatch length types:
1. Fixed: p. Max cap
2. Var: q. Runtime
3. Null: r. Zero byteMatch char scan:
1. Scan: p. In set
2. Verify: q. Not in
3. Match: r. CharMatch immut trade:
1. Thread: p. Safe
2. Copies: q. Costly
3. State: r. SimplerMatch byte encodings:
1. CJK: p. Two bytes
2. EUC: q. ASCII safe
3. Shift: r. UnsafeMatch compare cost:
1. Equals: p. Bool
2. Cmp: q. Int result
3. C-str: r. CostlyMatch sub-strings:
1. Prefix: p. Start
2. Suffix: q. End
3. Factor: r. Slice