A user that inputs 1 and 2 into the following code will result in what output? int col; int row; Scanner input = new Scanner(System.in); String [] [] board = {{" - System.out.println("\t" System.out.println("\t" System.out.println("\t" - - row=input.nextInt (); col = input.nextInt (); board [row] [col] = " X "; "}, + Arrays.toString (board [0])); + Arrays.toString (board [1])); + Arrays.toString (board [2])+"\n") System.out.print("X - Select row (0-2) & select column (0 System.out.print("separated by a space: "); - "}, " - "}}; System.out.println("\t" + Arrays.toString (board [0])); + Arrays.toString (board [1])); System.out.println("\t" System.out.println("\t" + Arrays.toString (board [2]) + "\n") 1 As

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 2GZ
icon
Related questions
Question
100%
TO
A user that inputs 1 and 2 into the following code will result in what
output?
int col;
int row;
Scanner input = new Scanner(System.in);
String [] [] board = {{"
11
I
11
{" - >
{"
row input.nextInt ();
col input.nextInt ();
board [row] [col] = " X ";
"}};
System.out.println("\t" + Arrays.toString (board [0]));
System.out.println("\t" + Arrays.toString (board [1]));
System.out.println("\t" + Arrays.toString (board [2])+"\n")
System.out.print("X- Select row (0-2) & select column (0
System.out.print("separated by a space: ");
a.)
Well done! You have c
System.out.println("\t" + Arrays.toString (board [0]));
System.out.println("\t" + Arrays.toString (board [1]));
System.out.println("\t" + Arrays.toString (board [2])+"\n")
D
000
1.
As y
of th
dime
we ar
Mac
Transcribed Image Text:TO A user that inputs 1 and 2 into the following code will result in what output? int col; int row; Scanner input = new Scanner(System.in); String [] [] board = {{" 11 I 11 {" - > {" row input.nextInt (); col input.nextInt (); board [row] [col] = " X "; "}}; System.out.println("\t" + Arrays.toString (board [0])); System.out.println("\t" + Arrays.toString (board [1])); System.out.println("\t" + Arrays.toString (board [2])+"\n") System.out.print("X- Select row (0-2) & select column (0 System.out.print("separated by a space: "); a.) Well done! You have c System.out.println("\t" + Arrays.toString (board [0])); System.out.println("\t" + Arrays.toString (board [1])); System.out.println("\t" + Arrays.toString (board [2])+"\n") D 000 1. As y of th dime we ar Mac
user that inputs 1 and 2 into the following code will result in what
utput?
put = new Scanner(System.in);
board =
-
{"
esc
"
a.)
-
11
nput.nextInt();
nput.nextInt ();
row] [col] = " X ";
- 11 11
"
1
51
11
'
AA
11
11
'
out.println("\t" + Arrays.toString (board [0]));
out.println("\t"
+ Arrays.toString(board [1]));
out.println("\t" + Arrays.toString (board [2]) + "\n");
out.print("X - Select row (0-2) & select column (0 - 2) ");
out.print("separated by a space: ");
11
'
out.println("\t" + Arrays.toString(board [0]));
out.println("\t"
+ Arrays.toString (board [1]));
out.println("\t"
+ Arrays.toString (board [2]) + "\n");
"},
"},
"}};
80
000
000
1. F
As yo
of the
dimen
we are
Mac
Transcribed Image Text:user that inputs 1 and 2 into the following code will result in what utput? put = new Scanner(System.in); board = - {" esc " a.) - 11 nput.nextInt(); nput.nextInt (); row] [col] = " X "; - 11 11 " 1 51 11 ' AA 11 11 ' out.println("\t" + Arrays.toString (board [0])); out.println("\t" + Arrays.toString(board [1])); out.println("\t" + Arrays.toString (board [2]) + "\n"); out.print("X - Select row (0-2) & select column (0 - 2) "); out.print("separated by a space: "); 11 ' out.println("\t" + Arrays.toString(board [0])); out.println("\t" + Arrays.toString (board [1])); out.println("\t" + Arrays.toString (board [2]) + "\n"); "}, "}, "}}; 80 000 000 1. F As yo of the dimen we are Mac
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT