Feb 7, 2001 #1 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? }
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? }
Feb 7, 2001 #2 Otto Programmer Dec 31, 1998 224 HU 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. Upvote 0 Downvote
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.
Feb 8, 2001 #3 srikandula Programmer Dec 28, 2000 31 US 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]="man"; arr[1]="two"; arr[2]= "three"; return arr; } } Upvote 0 Downvote
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]="man"; arr[1]="two"; arr[2]= "three"; return arr; } }