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

What is the solution to the equation 2(4-8x)+5(2x-3)=20-5x
Which of the items below would represent the phenotype of an individual? A, GG B. Hh C. brown fur
Help me on this please
Behavioral economists attribute some consumer behavior to the endowment effect. Which of the following is an example of the endowment​ effect? An example of the
R You the rrdddfijjiiujb. Gfxztdg .!8@‘@g
A couple has a total household income of $84,000. The husband earns $18,000 less than twice what the wife earns. How much does the wife earn?
Warm air above large bodies of water rises into the atmosphere, carrying with it water vapor that forms clouds. Likewise, as air in the upper atmosphere cools,
Which is true about cave paintings
Assume the existing capital of a partnership is $100,000. Two partners currently own the partnership and split profits 40/60. A new partner is to be admitted an
Can you also help with this one? Thank you!