import static java.lang.System.*; public class VarArgsTest{ public static void main(String args[]) { String[] names = {"Nixon","Carter","Clinton", "Bush"}; printAll(3,"Peter", "Paul", "Mary"); printAll(3,names); printAll(4,2,4,6,8,10,12,14); Class vat = VarArgsTest.class; try{ java.lang.reflect.Method m = vat.getMethods()[1]; System.out.println( m.toString() ); printAll( m.getParameterTypes().length, m.getParameterTypes() ); System.out.println(java.lang.reflect.Modifier.toString(m.getModifiers())); }catch(Exception e){ System.out.println( "UUPS" + e ); } } public static void printAll(int no, Object... s){ for(int i=0;i