GitHub Viewer
//Taking a matrix as an input and printing its elements.
package Array;
import java.util.*;
public class Print2DArray {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int rows = sc.nextInt();
int cols = sc.nextInt();
int array[][] = new int[rows][cols];
//input
for(int i=0; i