Array2DTester - System.out.println("Enter a column to...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.util.Scanner; i public class Array2DTester { public static void main (String [] arg) { Scanner in = new Scanner(; Array2D intArr = new Array2D(); //set 5 values in the 2D array for (int i = 0; i < 5; i++) { System.out.println("Enter a row to set: "); int inputRow = in.nextInt();
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.println("Enter a column to set:"); int inputCol = in.nextInt(); System.out.println("Enter the value to set: "); int inputValue = in.nextInt(); intArr.setArray(inputRow, inputCol, inputValue); } intArr.printArr2D(); } }...
View Full Document

This note was uploaded on 06/07/2010 for the course CS 201 taught by Professor Staff during the Spring '08 term at Iona.

Ask a homework question - tutors are online