Consider the following code:
public class
Test {
static int i;
static public void main(
String[] args)
{
do
{
System.out.println(args[++i]); //line1
} while (i < args.length);//lin2
}
}
Why does the above code throws ArrayIndexOutOfBoundsException?
Further i need explanation for the commentted lines marked with line1,line2
Thx
Venkat