Hi i Have written some code at Uni for two programs
this is my first one
// filename: ArrayClient.java
// Author:
// Last Updated :Jan 2005
//
// Program to demonstrate how to provide a class
// of array utilities
//
public class ArrayClient
{
public static void main (final String[] pArgs)
{
int [] tArray = new int [4];
tArray [0] = 11;
tArray [1] = 22;
tArray [2] = 33;
tArray [3] = 44;
ArrayUtilities.outputArray (tArray);
ArrayUtilities.resetArray (tArray);
ArrayUtilities.outputArray (tArray);
}
}
and this is the second piece of code i have written
// Filename: ArrayUtilities.java
// Author
// Last Updated Jan 2005
// by
// class that provides a number of Array Utilities
//
public class ArrayUtilities
{
// Method to reset an integer array so that
// all elements have the value zero
public static void resetArray (final int [] pArray)
{
for (int i = 0; i < pArray.length; i++)
{
pArray [i] = 0;
}
}
// method to output the contents of an integer array
public static void outputArray (final int [] pArray)
{
for (int i = 0 ; i <pArray.length; i++)
{
System.out.print (pArray [i] + " ");
}
System.out.println();
}
// fliename sumArray method to add the integers of
// an array together
public static void sumArray (final int [] pArray)
{
int tSum = 0;
for (int i = 0 ; i <tSum; i++)
{
tSum += pArray [i];
}
}
}
my problem is when i wrote them at Uni they both compiled and worked (on a mac G5)
I FTP'd them home and now only the ArrayUtilities will compile. I re-wrote the ArrayClient file and it still wont compile this is the error message i get everytime i try to compile the ArrayClient file
C:\Documents and Settings\Administrator\Desktop\UNI\Programming\Programming2\week1\ArrayClient.java:20:
cannot resolve symbol symbol : variable ArrayUtilities location: class ArrayClient ArrayUtilities.outputArray (tArray);
C:\Documents and Settings\Administrator\Desktop\UNI\Programming\Programming2\week1\ArrayClient.java:22: cannot resolve symbol symbol : variable ArrayUtilities location: class ArrayClient ArrayUtilities.resetArray (tArray);
C:\Documents and Settings\Administrator\Desktop\UNI\Programming\Programming2\week1\ArrayClient.java:24: cannot resolve symbol symbol : variable ArrayUtilities location: class ArrayClient ArrayUtilities.outputArray (tArray);
3 errors
Tool completed with exit code 1
can anyone point me in the right direction as to what i am doing wrong.
any help will be appreciated