Tuesday, August 9, 2011

Java error: Unexpected Type. Required: Variable, Found: Value?

printFactors requires an int as a number,m you can't call it with a string argument. Maybe the fact that you define number as a string in main and a number in printFactors is confusing you. (It's a good idea to name your variables based on what they do and are. "number" would seem to be a numeric of some kind.)

No comments:

Post a Comment