Accenture Primer
Accenture DumpmediumAccenture PrimerPrimer-Dump

Accenture Accenture Primer Practice Question

class One { } class Two extends One {

Answer options

A
public class Main {
B
static String s="Print";
C
public static void main(String[] args)
D
One[] a=new One[2];
E
Two[] b = new Two[2];
F
print(a);
G
print(b);
H
print(7);
I
System.out.println(s);
J
static void print (One[]...a2){

Correct answer: System.out.println(s);

Explanation

The varargs method print(One[]...a2) is called three times. Static field s='Print', s is concatenated with results ('4', '3', '4'). Output: 'Print 434'. Option 8 (System.out.println(s)) is the print statement that outputs this result.

Related Accenture Accenture Primer questions

Practice more Accenture Accenture Primer questions

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