I'm having trouble returning arrays from a custom method. It compiles fine but I get back:
[Ljava.lang.String;@20cf2c80
Press any key to continue . . .
I use:
System.out.println(getItem(1));
code:
public static String[] getItem(int e) {
String[] stats = new String[7];
String name = "Null";
String desc = "None";
String typeOf = "0";
String attackAdd = "0";
String defenseAdd = "0";
String canSell = "true";
String canEat = "false";
String earnedCoins = "0";
if (e == 1) {
name = "Pickaxe";
desc = "Can be used to mine with.";
typeOf = "2";
}
return new String[] { name, desc, typeOf};
}
Help? :\