Difference between revisions of "Case Study IV"

From CompSciWiki
Jump to: navigation, search
Line 17: Line 17:
 
int intArray[] = new int[5];
 
int intArray[] = new int[5];
  
for(int i=0; i <= 5; i++)
+
for(int i=0; i <= intArray.length; i++)
 
{
 
{
 
   system.out.println(intArray[i]);
 
   system.out.println(intArray[i]);

Revision as of 15:20, 5 December 2007

COMP 1010 Home > Java Fundamentals


Introduction

Now that you have fixed your code, added loops to make it more compact, and broken your code into logical tasks called methods, we will take a look at further organizing your code on day four at Funky Books Inc. These modifications will be made to your previous Case Studies' code using the Array structures.

   

{{{Body}}}



Array Overview

This is not done yet, testing things atm.

int intArray[] = new int[5];

for(int i=0; i <= intArray.length; i++)
{
  system.out.println(intArray[i]);
}

Solution

Case Study IV - Solution

Links To Other Case Studies

Case Study I: Day One at Funky Books Inc.
Case Study II: Day Two at Funky Books Inc.
Case Study III: Day Three at Funky Books Inc.