Match overload traps: 1. Clash: p. Ambiguity 2. Cast: q. Promotion 3. Vararg: r. Low rank
A1-p, 2-q, 3-r
B1-p, 2-r, 3-q
C1-q, 2-p, 3-r
D1-r, 2-p, 3-q
Answer & Solution
Correct answer: A. 1-p, 2-q, 3-r
Overload ambiguity triggers compiler errors when multiple matches tie, widening promotion resolves ties, and varargs have lowest precedence.
Keep practising User-Defined Methods and Constructors
Browse all User-Defined Methods and Constructors questions for ICSE Class 10, or explore more Computer Applications topics.
Related questions
Match ctor timing:
1. Load: p. Once run
2. Inst: q. Every new
3. Call: r. On demandMatch singleton cues:
1. Priv: p. Hide ctor
2. One: q. Shared inst
3. Get: r. Factory funMatch overload ties:
1. Exact: p. High rank
2. Widen: q. Promotion
3. Amb: r. Compile errMatch copy traits:
1. Param: p. Same type
2. Hand: q. Code copy
3. Auto: r. No defaultMatch bad ctors:
1. Return: p. Has type
2. Loop: q. Self chain
3. Mod: r. Non-accessMatch memory steps:
1. Zero: p. Clear mem
2. Field: q. Set value
3. Ctor: r. Body logicMatch hierarchy ctors:
1. Base: p. Parent run
2. Top: q. Root Object
3. Auto: r. ImplicitMatch chaining rules:
1. This: p. Peer ctor
2. Line: q. First line
3. Cycle: r. Forbidden