Header

  1. View current page

    정상혁의 수첩

Profile_img_60x60_08
195

Java 배열 복사

 

public class Test
{
 public static void main(String[] args)
 {
 

int[] source = {1,2,3,4,5};
  int[] target = (int[])source.clone();

 

 for(int i = 0 ; i < target.length; i++)
   System.out.println(target[i]);
 }
}

 

 

History

Last edited on 08/30/2007 17:21 by benelog

Comments (0)

You must log in to leave a comment. Please sign in.