Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RETURN A TABLE

Status
Not open for further replies.

KryptoS

Programmer
Feb 7, 2001
240
BE
how can I return a table to my main?

eg.

private String []table;

public String TableReturn()
{
... // what do I have to put here to return the table?
}
 
Hi!

Here is a little example, I hope this help you:

private String[] table;

table=returnTable();


public String[] returnTable() {
int i;
String[] t;

t=new String[10];
for (i=0; i<t.length; i++) {
t=new String(Integer.toString(i));
}
return t;
}


Good luck. Bye, Otto.
 
Boss your question is similar to that of mr wimkumpen
i have given solution to him you can refer.

orlese i repeat the code here also ahve this example.


public class Help {

public static void main(java.lang.String[] args) {
String [] ss = send();
System.out.println(ss[0]+ss[1]+ss[2]);

}

public static String[] send(){
String [] arr= new String[3];

arr[0]=&quot;man&quot;;
arr[1]=&quot;two&quot;;
arr[2]= &quot;three&quot;;

return arr;

}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top