Accenture Primer
Accenture DumpmediumAccenture PrimerAccenture-Primer-Dump

Which of the following is a correct declaration in java?

Answer options

A
char[] Tic = new char();
B
char[] Tic = new char[19];
C
char[] Tic = new char(14);

Correct answer: char[] Tic = new char[19];

Explanation

In Java, char arrays are declared with square brackets and size: 'char[] Tic = new char[19];'. Using parentheses like new char() or new char(14) is invalid syntax.

Related Accenture Accenture Primer questions

Practice more Accenture Accenture Primer questions

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