File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes What if i want a return Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

What if i want a return

Duc Nguy
Greenhorn

Joined: Nov 12, 2001
Posts: 7
What should i put if i want a return?
James Hobson
Ranch Hand

Joined: Aug 28, 2001
Posts: 140
return;
or if you want to return an int, you could do
public int myMethod() {
return 5;
}
I think you need to be more specific in your question.
James
Eric Johnson
Ranch Hand

Joined: Apr 30, 2001
Posts: 49
put the data type as the return type. if your code will return an int, put int. if it returns a string, put String. if it returns an object, put the object. for instance,

will return the int 3 to whatever calls it.
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 984

I feel like I am writing this program with Duc
line
by
line


Please ignore post, I have no idea what I am talking about.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What if i want a return
 
Similar Threads
struts tags
Return
Doubt: K&B Self Test (Resolved and in errata)
How to find the extention of file
return 2 strings