method duplicates: pass array 2 vararg method call ( IDEA-53635)

This commit is contained in:
anna
2010-05-20 20:24:13 +04:00
parent 06e808e881
commit 6af63745e1
4 changed files with 32 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
class Test {
public void printArray(String... p) {
System.out.println(p[0]);
System.out.println(p[1]);
}
public void doSmth() {
String[] arr = {"smth1", "smth2", "smth3"};
printArray(arr);
}
}