Which one of the following is a valid statement?
Which one of the following is a valid statement? Correct Answer <span class="key">char<span> <span class="args">c <span>= <span class="key">new char<span>;
The syntax for declaring and creating an array variable in java is:
dataType arrayRefVar = new dataType;
Thus, option (A) and option (C) is syntactically wrong as parentheses( ( ) ) is used instead of square brackets( ).
Option (D) is incorrect as the size of the array is missing.
মোঃ আরিফুল ইসলাম
Feb 20, 2025