Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cannot find symbol

 
Dustin Schreader
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get error for cannot find symbol for the setNumOne in my test program
 
Stephan van Hulst
Bartender
Posts: 6337
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You declare numOne and numTwo incorrectly. (Actually you don't declare them at all).

Take a look at lines 23 and 24, and see what you can change.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's this ?
 
Dustin Schreader
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With newOne I was trying to instantiate the first set to store a set of numbers that would be tested along with the other set setTwo
 
Dustin Schreader
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it supposed to look something like this?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do yo declare a variable ? You declare the variable type and its name. Is "numOne" a valid type ?
 
Dustin Schreader
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about this, I guess I may have forgotten about getting rid of the b
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Think again You want to use two UnorderedSet. One is called numOne, another one is called numTwo. How do you declare an UnorderedSet whose name is "numOne" ? How do you declare an UnorderedSet of Strings whose name is "numOne" ?

How do you declare an int whose name is "count" ? -> int count. Apply the same rule above.
 
Dustin Schreader
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OH! So it can be declared just like any other variable, I get what your saying! Since it's a string I wouldn't need the <T>?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Close. It's not a String. It's an UnorderedSet of Strings : UnorderedSet<String>.
 
Dustin Schreader
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
numOne = new UnorderedSet<String> Just got off work and now I have a compiler I can use, which still doesn't like the code.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dustin Schreader wrote:numOne = new UnorderedSet<String> Just got off work and now I have a compiler I can use, which still doesn't like the code.


 
Dustin Schreader
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the Help!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic