Another problem in my code is that I'm not able to send array information between classes. I've created a sample program: Would anyone be able to fix this program so that it actually returns the array?
In c++, I would just send a pointers/refferencea to my array and into the class method. In java is there anyway I can have a pointer to my array in ArrayCollect, and bring that pointer into ArrayData. Or does this work with by fixing the syntax errors?
Edit**
class ArrayData
{
int someInt [] = new int [1];
public ArrayData ()
{
someInt = new int [3];
for (int i = 0 ; i < 3 ; i++)
{
someInt [i] = (5 * i) + 1;
}
}
int getInt ()
{
return someInt [];
}
}
class ArrayCollect
{
public static void main (String [] arguments)
{
ArrayData tempData = new ArrayData ();
int yeint[] = new int[3];
yeint[] = tempData.getInt ();
}
}