public class TestVargs
{
public static void main(
String[] a)
{
TestVargs t=new TestVargs();
t.doStuff(1);
t.doStuff(1,2);
}
public static void doStuff(int... w)
{
System.out.println("int w");
}
public static void doStuff(int i,int... ae)
{
System.out.println("int i,int.. ae");
}
}
when i compile the above code in java1.5
it s displaying two errors:
one is:<identifier expected>
public static void doStuff(int... w)
^
second is:<identifier expected>
}
^
what is the problem?