I am new to java. My code is:
public class Hi {
public static void main(String[] args) {
System.out.print("Hi, ");
System.out.print(args[2]);
System.out.print(",");
System.out.print(args[1]);
System.out.print(", and");
System.out.print(args[0]);
System.out.println(".");
}
}
I get the following exception upon running this program:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2
at Hi.main(Hi.java:5)
I would be glad to know why I had got this exception and how to resolve it.

java hi any_arguments?java Hi Mango Orange Bananaif (args.length < 3) chastiseUser();