Below is my Java code:
public class MainClass {
/**
* @param args
*/
public static void main(String[] args){
char c = args[0].charAt(0);
char c1 = (char)(c + 1);
System.out.println(c + "\t" + c1);
}
}
When I try to compile it in Eclipse, I get the below error:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at MainClass.main(MainClass.java:9)
Can anyone tell me how to Run a Simple Java Program in Eclipse?