Multidimensional Array Enhanced For-loop Input Scanner method using Case-statements Simple Al as machine input for (char[] row:charName) { for (char c:row) { System.out.print(c); } System.out.println(); } charName[0][0] = '1'; Scanner scan = new Scanner(System.in); int pos = scan.nextInt(); 5. Create some method/function to be used to add functionality to the application program. 6. Add simple AI (for machine input) 7. Using Arraylist to scan patterns in the multidimensional array.
Added by Sofia M.
Close
Step 1
``` char[][] charName = { {'a', 'b', 'c'}, {'d', 'e', 'f'}, {'g', 'h', 'i'} }; ``` Show more…
Show all steps
Your feedback will help us improve your experience
Rosemary Charnley and 82 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.
Supreeta N.
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
Watch the video solution with this free unlock.
EMAIL
PASSWORD