You are on page 1of 1

/* * To change this template, choose Tools | Templates * and open the template in the editor.

*/ package aryprog2; /** * * @author Karl */ public class Arrayprog2 { /** * @param args the command line arguments */ public static void main(String[] args) { int[][] grid ={ {1,3,5,7}, {2,4,6,8}, {5,14,23,32}, }; System.out.println(grid[2][3]); String[][] txtArray = new String[2][3]; txtArray[0][2] = "Hello Karl"; System.out.println(txtArray[0][2]); for(int row=0;row<grid.length;row++){ for(int col=0;col<grid[row].length;col++){ System.out.print(grid[row][col] + "\t"); } System.out.println(""); } } }

You might also like