package com.java.example;
public class ArrayCopy {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
char source[]={'W','E','L','C','O','M','E','J','A','V','A'};
char dest[]=new char[4];
System.arraycopy(source, 7, dest, 0, 4);
System.out.println(new String(dest));
}
}
public class ArrayCopy {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
char source[]={'W','E','L','C','O','M','E','J','A','V','A'};
char dest[]=new char[4];
System.arraycopy(source, 7, dest, 0, 4);
System.out.println(new String(dest));
}
}
Comments
Post a Comment