• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

this code gives a run time error and i am stuck!!!

 
Ammar Salem
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


the error is :
Exception in thread "main" java.lang.arrayIndexOutOfBoundException:0
at Candidate.main(Candidate.java:34)
 
praveen Shangunathan
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i ran it and did not get any error.
Did you give arguments when you run it ?
 
Ammar Salem
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No i did not give any arguments OPPs!!! Sorry
thank you .
 
Bill Shirley
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ergo, the code needs fixing:

 
Ammar Salem
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much Bill, I appreciate your suggestion.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic