1 // This test case was built for java/3096. 2 3 class PR3096 4 { foo(int x[], int i)5 static void foo (int x[], int i) { 6 ++x[i]; 7 } foo(float x[], int i)8 static void foo (float x[], int i) { 9 ++x[i]; 10 } main(String [] args)11 public static void main(String [] args) { 12 int a[] = new int [1]; 13 float f[] = new float [1]; 14 int b[]; 15 int i = 0; 16 foo (a,0); 17 foo (f,0); 18 System.out.println (a[0]); 19 System.out.println (f[0]); 20 System.out.println ((b=a)[0]); 21 (b=a)[i]=99; 22 b[0]++; 23 System.out.println (a[0]+", "+b[0]); 24 System.out.println (++a[i]); 25 System.out.println (a[i]); 26 System.out.println (a[i]++); 27 System.out.println (a[i]); 28 String s[] = new String [1]; 29 String y[]; 30 s[0]=""; 31 s[0] += "Peace "; 32 System.out.println (s[0]); 33 (y=s)[0] += "now!"; 34 System.out.println (s[0]+", "+y[0]); 35 } 36 } 37