• Post Reply Bookmark Topic Watch Topic
  • New Topic

set method not working.  RSS feed

 
Adam Chalkley
Ranch Hand
Posts: 518
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure why my set method is not working to me it looks like everything has been done right and its not given me any exceptions just a cannot find symbol error

everything in this class compiles VV




but in main I get the error.





any ideas? Thanks
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What error do you get? You showed us the Age1 class and you are using a different class in the main method.
Please avoid names like ja1 and Age2 and abbreviations like VV because their meaning is not obvious either in ordinary writing or in code.

As you will have learnt from your other code, you are incorrect calling age global.
 
Adam Chalkley
Ranch Hand
Posts: 518
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:What error do you get? You showed us the Age1 class and you are using a different class in the main method.
Please avoid names like ja1 and Age2 and abbreviations like VV because their meaning is not obvious either in ordinary writing or in code.

As you will have learnt from your other code, you are incorrect calling age global.



Sorry my bad it was actually because of bad class naming I used 1 instead when I was creating the object stupid mistake no problem at all just stupid naming convention I used on this,well lesson learned now lol

Thanks.
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what errors are you getting? We can only help if we know that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!