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

This commit is contained in:
anna
2010-05-21 10:03:11 +04:00
parent 06e808e881
commit 6af63745e1
4 changed files with 32 additions and 1 deletions
@@ -0,0 +1,13 @@
class Test {
public void print<caret>Array(String... p) {
System.out.println(p[0]);
System.out.println(p[1]);
}
public void doSmth() {
String[] arr = {"smth1", "smth2", "smth3"};
System.out.println(arr[0]);
System.out.println(arr[1]);
}
}