Why can the class java.lang.Void not be instantiated in Java?
Avoid cannot type objects
BIt is marked abstract
CIt lacks class fields
DIt requires arguments
Answer & Solution
Correct answer: A. void cannot type objects
The Void class cannot be instantiated because void cannot be the type of any object.
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