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 Help me to write java function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help me to write java function" Watch "Help me to write java function" New topic
Author

Help me to write java function

Sudhir Pawar
Greenhorn

Joined: Sep 27, 2012
Posts: 25
Help me to write java function which returns arrays of int float and String values.
And how can i store this returned values in another function??
please give me sample code here...
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Hello Sudhir Pawar ,

Do you wish to have three separate functions for each return type ? . Or you want a single method to return all three arrays ?

For the first option, you can do something similar to this


However if you would like a single method to return all the three arrays then , in my opinion , you can declare a class with the three arrays and then initialize an object of this class, set the 3 arrays , and return this object
MyClass looks like this


Then you can call this method and return the object of this class



Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
Sudhir Pawar
Greenhorn

Joined: Sep 27, 2012
Posts: 25
thank you...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help me to write java function