package com.sudhirtheindian2.java123;
import java.util.Scanner;
public class twoDarray {
public static void main(String[] args) {
// How to use 2D array in java
int[][] a =new int[2][2];
System.out.println("enter your array element");
Scanner scanner = new Scanner(System.in);
for (int i = 0; i<2;i++){
for (int j=0;j<2;j++){
a[i][j] = scanner.nextInt();
}
}
for (int i = 0; i<2;i++){
for (int j=0;j<2;j++){
System.out.print(a[i][j]+" ");
}
System.out.println();
}
}
}
Computer Storage Units Converter Computer Storage Units Converter From: Bytes Kilobytes Megabytes Gigabytes Terabytes Value: To: Bytes Kilobytes Megabytes Gigabytes Terabytes Convert
टिप्पणियाँ
एक टिप्पणी भेजें