Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
449 B
1
Indexable
Never
package com.company;

public class Main {

    public static void main(String[] args) {
	int [][] array= new int [3][3];
	int c =1;
	for (int i=0;i<array.length; i++) {
        for (int j=0; j<array[i].length; j++){
            array[i][j] = c++;
        }
    }

	for (int i=0; i<array.length; i++) {
        System.out.println("");
        for (int j=0; j<array[i].length; j++) {
            System.out.print(array[i][j]);
        }
    }
    }
}