In this I am attempting to get the salutations()
method to output the array created in the initialize()
method.
The error I receive just tells me to create a local variable for the array when i need it to be inside the other method.
public void initialize() {
String[] salutations = new String[]{"greetings", "hello", "good afternoon"};
String[] verses = new String[]{"we hope you are having a good Christmas", "we wish you a merry x-mas", "we wish you a good new year"};
String[] closing = new String[]{"", "b", "c"};
}
public void salutations(){
int i=1;
String x;
x=(String)Array.get(salutations, i);
System.out.println(+x+" ");
}