Lab24h - int ray = new int[size out.println for(int j = 0...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
// A+ Computer Science  -  www.apluscompsci.com  //Name -  //Date -  //Lab  -  import java.util.Scanner;  import java.util.Arrays;  import static java.lang.System.*;  public class Lab24h  public static void main( String args[] )  Scanner keyboard = new Scanner(in);  out.print("How many arrays do you wish to enter? :: ");  int rowCount = keyboard.nextInt();  //instantiate a TwoDRay  for(int i = 0; i < rowCount; i++)  out.print("What is the size of array " + i + " : ");  int size = keyboard.nextInt(); 
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int ray = new int[size]; out.println(); for (int j = 0; j<ray.length; j++) { out.print("Enter the value for spot " + j + " :: "); ray[j] = keyboard.nextInt(); } out.println("\nTwoDRay before copying ray to row "+i); //print out the TwoDRay - call toString() //call setRow out.println("\nTwoDRay before sorting row "+i); //call TwoDRay toString() //call setRow out.println("\nTwoDRay after sorting row "+i); //call TwoDRay toString() } } }...
View Full Document

This note was uploaded on 01/24/2011 for the course COMP SCI 543 taught by Professor Mark during the Spring '10 term at Brown College.

Page1 / 2

Lab24h - int ray = new int[size out.println for(int j = 0...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online