fady zohdy wrote:
i am really sorry . i modified in the code before submitting it here. here is the right exception
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
at testing.Arrays.main(Arrays.java:19)
Well, assuming that this line is close, it would be caused by this line...
which can be caused by two possibilities. However, from the code, we can eliminate one.
It is most likely that your input doesn't split to four components -- in fact, from the error message, it only splits to one element.
Henry