When I want to run my java code, I have this problem :
Exeption in thread "main" java.lang.ArrayIndexOutOfBoundsException:0
at com.ibm.icu.text.BreakDictionary.main(BreakDictionary.java:44)
i can’t run my code… It’s simple
public class main{
public static void main(String[] args){
System.out.print("Hi");
}
}
WTF is
com.ibm.icu.text.BreakDictionary?Make sure of the class whose main you are running. I suspect you’re not running your class. Your java command should look like this:
Better yet, use an IDE like eclipse that make it easy to run a class
Also, rename your class from
maintoMyClass– anything with a leading capital letter – it’s good coding style