• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trouble with Changing part of ArrayList  RSS feed

 
Austin Hilten
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a class schedule program in which i need to be able to change the course name and course hours. I only need to hardcode the data. Change student name and change student ID both work but when i put in the course name and course hours, it keeps getting a nullpointerexception This is part of the other class where ive tried to set the change method.
 
Guillermo Ishi
Ranch Hand
Posts: 789
C++ Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Austin Hilten wrote:I have a class schedule program in which i need to be able to change the course name and course hours. I only need to hardcode the data. Change student name and change student ID both work but when i put in the course name and course hours, it keeps getting a nullpointerexception


Name and ID work on stud, and course name and hours work on stud2. So it sounds like stud2 isn't initialized right. You don't show the code where you initialize either one. The exception should give you a dump that says where the problem is.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!