Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
If I do not provide any arguments on the command line then will the string array of main be empty or null?
I tried the following code to find out.... but it shows an "ArrayOutOfBoundsException" error...Why is that ?
public class trial
public static void main(String args)
If you don't pass in any arguments to the main method, the array is empty (length=0) not null. This is why when you try args gives you ArrayIndexOutBoundsException rather than NullPointerException or anything else.