0

If I have an integer array of monthSales, obviously the length of 12, what does it mean to "write a statement that writes to standard output the element corresponding to October"?

Is writing to an element in an array different from assigning said element to a previously defined variable?

1
  • writing to standard output means displaying the value on the console screen (usually) Commented Apr 5, 2018 at 1:50

1 Answer 1

3

Since the array index starts from 0, October Month will corresponds to index 9

System.out.println("Your sales for month of October is" + monthSales[9]);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.