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

How can businesses best take advantage of globalization?​
5X3X17X200X1,098 the X's are multiplication symbols
Right triangle ABC is shown on the graph below. If the point (-4, y) lies on the line that goes through side BC of the triangle, then what should be the value o
Name the type of element that has luster, conducts electricity and is malleable
Which ruler greatly changed 17th century French art in order to assert the principle of the divine right of kings and make himself “the Sun King ”?
AlgebrWhat is the product of the binomials?(3x + 8)(5x - 9)​
What triangle has 2 perpendicular sides? Isosceles, equalateral, or scalene?
Divide. -6:31 Enter your answer as a mixed number, in simplified form, in the box.
Study the political cartoon which statement best describes the image
Which goal of conservation fund is accomplished in part by saving the Three Sisters Springs A. Conserve Gulf oil B. Conserve water C. Conserve land D. Conserve