Results 1 to 3 of 3
- 10-17-2008, 09:11 PM #1
Member
- Join Date
- Oct 2008
- Posts
- 7
- Rep Power
- 0
Accessing return value without printing
Hey
I have a method that I would like to ask a question and receive an answer from the keyboard. Then, in my main method I would like to use 'if' methods depending on what the answer is from previously mentioned method. The problem is that when I try to access the return value in the main method, it goes through the whole method again, which includes re-printing the question.
Thanks!
- 10-17-2008, 11:53 PM #2
You'll have to post the code for any help.
You must have a loop somewhere that returns to ask the question.
- 10-18-2008, 07:46 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
can you show us your code. It's difficult to answer to your question without looking on it.
Similar Threads
-
Using int/int, 7/5 would return 1
By zoe in forum New To JavaReplies: 2Last Post: 12-02-2008, 11:25 AM -
return out of scope?
By another_steve in forum New To JavaReplies: 5Last Post: 01-28-2008, 09:34 PM -
if..else..return
By mqdias in forum New To JavaReplies: 1Last Post: 08-10-2007, 04:20 PM -
Return value of method
By cachi in forum New To JavaReplies: 1Last Post: 08-01-2007, 08:23 AM -
Return to try block
By Freddie in forum New To JavaReplies: 2Last Post: 05-11-2007, 08:58 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks