0
Java: What is wrong?
I am not sure why this is throwing errors, mostly pertaining to } missing... public class Program { public static void main(String[] args) { String[][] job = {{"Paladin", "Sentry", "Warden"}, {"Squire", "Archer", "Monk"}, {"Cleric", "Shaman", "Prophet"}{"Witch", "Alchemist", "sorcerer"}}; System.out.println(job[2][3]); } }
2 ответов
+ 1
indexes of arrays start with 0 not with 1. I guess that's your error. You try to access an element which doesn't exist
+ 1
I was thinking about excel again.. thank you. I also just noticed I am missing a comma between 2 arrays