This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • 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