How do you declare an array in Java ? int arr int arr O Array int > arr arr
Added by Gonzalo H.
Step 1
In this case, let's use the data type "int". Show more…
Show all steps
Your feedback will help us improve your experience
Chandra Jain and 95 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
How to store a 2d Array in another 2d Array in java?
Chandra J.
'Which of the following correctly declares an array? int arr; int arr[array size]; array{array size}; array arr[array size];'
Rakesh S.
Write a Java program that declares an array to hold 12 integers. The contents of the array should be the values 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24. Use a for-loop to initialize the contents of the array to these values. After initializing the array to these values, the program should display the contents of the array. Suggested output: The contents of the array are: Index Value 0 2 1 4 Etc.....
Cora M.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD