• Post Reply Bookmark Topic Watch Topic
  • New Topic

cannot find symbol compile time error.  RSS feed

 
Varun Goenka
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly does this error mean?
flg4=Float.isFloat(f4);
what exactly is wrong with this statement?
Here's the code in the next post.........
 
Varun Goenka
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


[MG Added code tags]
 
Varun Goenka
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the files in a folder by the name of varun.
So dont worry about thet please.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means that there's no method named "isFloat()" in the java.lang.Float class; in fact, there's no method by that name in the entire Java API.

I'm not sure what you want such a method for, anyway. Float.valueOf() returns a float value; what would a method called "isFloat()" that takes a float argument actually do? When would a float not be a float?

If the user types in a value that can't be parsed as a float, Float.valueOf() will throw an exception -- i.e., it will not return. It won't create a bad value -- it will just not create a value at all.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Varun,
In future, while posting code, please use the CODE tags
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!