Which of these is an incorrect Statement?
А
It is necessary to use new operator to initialize an array
B
Array can be initialized using comma-separated expressions surrounded by curly braces
Array can be initialized when they are declared
D) None of the mentioned
Answers
Answer:
d none of the mentioned
The incorrect statement is A) It is necessary to use a new operator to initialize an array.
Explanation: A container object called an array carries a predetermined number of values of a single kind. When an array is constructed, its length is predetermined. Its length is fixed once it is created. An array's components are each referred to as elements, and each element is accessible via a unique integer index. Instead of writing each line separately, we utilise one of the allowed looping structures to cycle through each element of the array in a real-world programming scenario.
Both 'new' and 'comma-separated' expressions enclosed in curly braces can be used to initialise arrays.
Eg: int arr[10] = new int[10]; and int arr[] = { 2, 4, 6, 8, 10, 12, 14, 16 ,18, 20};
To learn more about arrays in Java, click on the links below:
https://brainly.in/question/27064623?msp_srt_exp=5
https://brainly.in/question/32603066
#SPJ3