Java 1.5 가 세상에 나온지도 이미 몇년은 지났을텐데... someMethod(String... strings) 와 같은 메소드를 사용하여 메소드에 가변적으로 갯수가 변하는 인수를 넘겨 줄 수 있다는 것을 알았다... - -; 이런 식으로 사용하면 될 것 같고... public class VarargsTest { public static void main(String[] args) { String result = null; result = arrayMethod1("str1", "str2", "str3"); System.out.println(result); result = arrayMethod2("str4", "str5", "str6"); System.out.println(result); } public static String arrayMethod1(String... strings) { String result = ""; for (String s : strings) { resu...
#1.5
#5.0
#Java
#Varargs
#가변인수
#변화
원문링크 : 자바2 1.5의 새로운 특징들 (Java 1.5의 변화)