At this point I'm just trying to get something to come out of what little I have and nothing is working.
So I start out with a driver class:
class TheDriverClass
{
public static void main(String[] args)
{
Phone p = new Phone(5);
System.out.println(p);
// Here it's supposed to return the values of an array with size 5,
//so it should print out 00000
}
}
Next I have the class Phone:
class Phone
{
private Phone[] arr; //I'm supposed to keep the array private
public Phone(int theLength){
arr = new Phone[theLength];
return Arrays.toString(arr);
}
}
Now it looks a little ridiculous because I've become desperate to get at least SOMETHING out and I've exhausted any and all ideas.
What is supposed to happen is that the driver class gives Phone a number which will be used as theLength of the array (arr), and the array is initialized with that length (all integers of the array defaulted to 0) and returns as many 0's as the array is long (or if I were to assign different values at different locations of the array, it will go through and print every value in the order it is placed in the array).