public class NewClass {
int[] anArray = {1,2,3,4};
}
public class NewerClass {
public static void main(String[] args){
sendToMethod(NewClass.anArray);
}
}
Obviously how i've written it above doesn't work, i was wondering how (if possible) it could be done?
Basically i want to have a class of arrays (NewClass) and want to be able to use them with the methods from the NewerClass whilst in the main method of NewerClass.
Its not essential, I'm simply playing around with ideas.