billy
Posts: 1
Nickname: billy
Registered: Apr, 2004
|
|
passing arrays to another class
|
Posted: Apr 17, 2004 6:39 PM
|
|
|
Advertisement
|
first of all i'd like to make it clear that i'm a java newb so please take it easy on me :]
i'm writing a class (for convenience sake lets call it Change)
i need to test this class, so i made another public class , which i'll call Tester.
the goal in this "program" is to invoke a method in Change, lets call the method : fix
so in Tester it will look something like this: Z = X.fix(Y);
whereas X, Y, Z are all arrays.
my question is how do i initiate X, Y, and Z...am i suppose to declare them as Change type? (derived from the class Change)
i'm having a real hard time with this and its killing me.
another thing i'd like to verify on is, am i suppose to write the fix method as the following : public fix (Change[] X, Change[] Y) ?
and what should the return type be on method fix, assuming i'm suppose to return an array to Z.
thx in advance! i'd be more than happy to elaborate on this if i'm confusing certain ppl!
|
|