-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharrray.java
More file actions
21 lines (21 loc) · 751 Bytes
/
arrray.java
File metadata and controls
21 lines (21 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package demo;
import java.util.Scanner;
public class arrray {
public static void main(String[] args) {
int a[][]=new int[3][3];
Scanner hu=new Scanner(System.in);
System.out.println(a.length);
for (int i=0;i<a.length;i++){
for(int j=0;j<a.length;j++){
System.out.println("Enter the value for the arrar of a for the index"+a[i][j]);
a[i][j]=hu.nextInt();
}
}
for (int i=0;i<a.length;i++){
for(int j=0;j<a.length;j++){
System.out.print(a[i][j]);
}
System.out.println();
}
}
}