Accenture Primer
Accenture DumpmediumAccenture PrimerPrimer-Dump

Accenture Accenture Primer Practice Question

public class TestMain extends Tree { public static void main(String s[])

Answer options

A
new TestMain().go();
B
void go(){
C
grow2(new Tree().new TestMain());
D
grow2(Main)new tree().nw TestMain());
E
void grow (Tree t1,main r1){
F
Testmain r2=(Testmain)t1;
G
Tree t2=(Tree)r1;
H
class Tree{}
I
ans = compile time error

Correct answer: ans = compile time error

Explanation

The code attempts to use TestMain as an inner class of Tree (new Tree().new TestMain()), but TestMain is a top-level class extending Tree, not an inner class. This results in a compile-time error.

Related Accenture Accenture Primer questions

Practice more Accenture Accenture Primer questions

PrimerDumps has 1400+ primer questions, 2026 mocks and coding hands-on — all free.