This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

cannot find symbol  RSS feed

 
Jesse Crockett
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These are supposed to work together. I get a bunch of "cannot find symbol" errors when working with currencyType from class Money. What am I doing wrong?


[ February 12, 2006: Message edited by: Jesse Crockett ]
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your first class definition, you cannot reference a variable defined in the class Money, without using a reference to a Money object.
 
Sol Mayer-Orn
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could I kindly suggest that you try to narrow down the problem ?
Please don't take this the wrong way - I'm really trying to help, but I've had trouble following all the code, which wasn't necessarily relevant to the question. Shorter code is likely to bring you much more replies.

In your case, if you're having a linking problem (one class can't use the other), can you please try post a version with shorter classes ? You could probably reproduce the error message, even if each class has just 3-4 lines of code (with some "hello world" method instead of the complicated currency calculations)...

It will also help if you quote the exact error message, and which line of code it's referring to.

Good luck.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!