I have two methods (not using a main method in this example), and I'm trying to pass the String array "transactions" found in the TransactionName method to the ArrayPrinter method and print it out. No return statements if possible.
Yes, I'm aware that the method headings probably need fixing to allow it to happen, so I'd like some help on that too. Sorry for the mess ahead of time.
import java.util.Arrays;
//I don't have my class or main method posted to save room ;)
public static void ArrayPrinter(String[] transactions)
{
System.out.println(transactions);
}
public String[] TransactionName()
{
String[] transactions = new String[]{"Mr. ", "Mrs. ", "Ms. "};
ArrayPrinter(transactions);
}
How can I make it compile?