LukeJV1486 LukeJV1486
  • 21-08-2019
  • Computers and Technology
contestada

What is the output? int[] arr = new int[1]; arr[0] 10; System.out.printin(arr[O]): 01 OArrayIndexOutorBoundsException

Respuesta :

ExieFansler ExieFansler
  • 28-08-2019

Answer:

Syntax Error.

Explanation:

You are creating an array of size 1.There is no assignment operator for arr[0].It should be arr[0]=10.System.out.printin(arr[O]) it should be System.out.println(arr[0]) .If all these syntax are correct then the outputy should be 10 because we have arr[0]=10.But for the code provided the answer is Syntax error because this code has many errors.

Answer Link

Otras preguntas

a group consisted of 2 girls for every boy. 24 girls joined the group. there are now 5 girls for every boy. how many boys are in the group
fill in the frequency table 1.students voted for a day not to have homework The results are shown in the box. which day got the most votes. monday friday thursd
the sum of a number p and seven is divided by twelve. the result is three. what is the number?
How much does pi equal?
The state with the largest number of immigrants is (1 point) California. Texas. New York. Florida..
in any ecosystem, decomposers are important for all BUT one of the following. A) They are important in keeping the nitrogen cycle going. B) They produce most o
The metric unit for time is a _______________. meter gram second liter
In the process of genetic engineering, what is the correct order of the steps? A. DNA separation, DNA extraction, and cutting DNA B. DNA extraction, cutting DNA
Who authorized the atomic bomb to be dropped on Japan?
Square root of x^2-4 plus x^2/x^2+1