This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes return???? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "return????" Watch "return????" New topic


mansi gupte
Ranch Hand

Joined: Dec 30, 2008
Posts: 72
What does return mean ?? if a method returns a value, to whom is it returned?/?

Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

There's an explanation at Sun's tutorial. Are you using a book to learn ?

[My Blog]
All roads lead to JavaRanch
Joseph Tsui

Joined: Jan 05, 2002
Posts: 6
the value will be return to the program that trigger this method.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 40426
Here the otherMethod method calls the method method in the Foo class and the i + j + k is sent back to otherMethod where it says int i =.
I agree. Here's the link:
subject: return????