public class Ex10_3{ public static void main(String []args){ int [] num = new int[4]; num[0] = 1; num[1] = 2; num[2] = 3; for(int i : num){ System.out.println(i); } String[] name= new String[4]; name[0] = "홍길동"; name[1] = "유관순"; name[2] = "이순신"; for(String n : name){ System.out.println(n); } } }
Java