Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes return 2 strings 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
Bookmark "return 2 strings" Watch "return 2 strings" New topic
Author

return 2 strings

Anthony Smith
Ranch Hand

Joined: Sep 10, 2001
Posts: 285
I got a function, and I want to return 2 string? What should I do?
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
You could return a:
1. String []
2. List containing your Strings
3. a user-defined class that aggregates 2 Strings
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Or a single string that is the concatenation of the two desired return values seperated by some character or character sequence.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: return 2 strings
 
Similar Threads
please help me with Recursion
return statement in initializer
sendRedirect(url) problem in jsp
wrapper classes
toString() on Integer class