Thu Jan 29, 2009 1:19 am
int[] myarr=new int[3];
car[] mycars=new car[3];
myarr[0]=32;
myarr[1]=12;
myarr[2]=50;
mycars[0]=new car("BMW");
mycars[1]=new car("VOLVO");
mycars[2]=new car("FIAT");
String[] myStrings = {"one", "two", "three", "four", "five"};
String[] copiedStrings = new String[4];
// 1 is the start position in the orginal position
// 0 is the start position in the copyTo position
System.arraycopy(myStrings, 1, copiedStrings, 0, 4);
for (int i = 0; i < copiedStrings.length; i++) {
System.out.print(copiedStrings[i] + " , ");
}
two , three , four , five ,
Wed Jan 16, 2013 12:44 am
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.