Abid Ramay wrote:i meant some theory to help understand the problem.
The problem was that if you don't pass any command line arguments to a program, the args array that is a parameter to the main method will not contain any values - it will be a zero lenghth array.
On line 13 of the program an attempt was made to access the first element of the array. Because the array has no elements, this isn't possible so the program throws an ArrayIndexOutOfBoundsException.
In general, if an array has size n, you can only access elements with indexes less than n and positive
e.g.
If you have an array of size 3, you can access elements 0, 1 and 2