| Author |
int to string??
|
gelle cerda
Greenhorn
Joined: Sep 28, 2004
Posts: 2
|
|
so how about this message: The method "java.lang.String getCoinName(int coinName);" must contain a return statement with an expression compatible with type "String". I am creating a method with an original int value from the main method and it must return a string. how can i do that? [ November 03, 2004: Message edited by: gelle cerda ] [ November 03, 2004: Message edited by: gelle cerda ]
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24061
|
|
It means that you're trying to read a variable before assigning a value to it. A trivial example: A trickier example: In the second example i may have been assigned to before the value is assigned to j, but it also may not have been. Make sense?
|
[Jess in Action][AskingGoodQuestions]
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24061
|
|
To an outsider reading this thread, my first post above must seem very odd. I should explain that the poster asked a questiont, and when I answered it aobove, edited his original message and replaced it with a completely different question! In any case, your method could look something like Does this help?
|
 |
 |
|
|
subject: int to string??
|
|
|