We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 747c774 commit a0c1a5cCopy full SHA for a0c1a5c
TwoDArray.java
@@ -1,14 +1,24 @@
1
-/*
2
- * To change this license header, choose License Headers in Project Properties.
3
- * To change this template file, choose Tools | Templates
4
- * and open the template in the editor.
5
- */
+
6
package basicjava;
7
8
-/**
9
- *
10
- * @author Asus
11
+import java.util.Scanner;
12
public class TwoDArray {
13
-
+ public static void main(String[] args) {
+ Scanner input = new Scanner(System.in);
+ int[][] arr = new int[3][3];
+ for (int i = 0; i < 3; i++) {
+ for (int j = 0; j < 3; j++) {
14
+ arr[i][j] = input.nextInt();
15
+ }
16
17
18
19
+ System.out.print(arr[i][j]+" ");
20
21
+ System.out.println();
22
23
24
}
0 commit comments