I have created a very small java application but that gives me an error "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0". Please help me to find the error. here is the code.
Are you better than me? Then please show me my mistakes..
You need to invoke this program with commandline parameters. Otherwise the array will have a size of 0 and you're trying to access an element which results in an ArrayIndexOutOfBoundsException. You need to do something like
java candidate 1 wouter 4-3-2011
And by the way classnames should begin with an uppercase character.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.