This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "return" Watch "return" New topic


Victor Lu

Joined: Jun 30, 2011
Posts: 6
What does

by itself do, when there is no return value specified? Thanks!
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60766

What are your thoughts on the matter?

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
ashwin bhawsar
Ranch Hand

Joined: Mar 16, 2011
Posts: 62

i think only 'return' without any values means it does not returns anything.
You can try out this piece of code:
Ogeh Ikem
Ranch Hand

Joined: May 13, 2002
Posts: 180
return means return to the calling method. If your method is a not a void method, it must return some data to the calling method.
I agree. Here's the link:
subject: return
Similar Threads
Nested JTables - The header of the inner JTable is not showing
struts2 action
Struts Tag inside a Custom Tag
ListCellRenderer problem (needing buttom support)
override equals