请教一个输出的问题
1 public class PassTest {2
3 float ptValue;
4
5 // Methods t
6 o change the current values
7 public void changeInt (int value) {
8 value = 55;
9 }
10
11 public void changeStr (String value) {
12 value = new String ( " different " );
13 }
14
15 public void changeObjValue (PassTest ref) {
16 ref.ptValue = 99.0f;
17 }
18
19 public static void main (String args[]) {
20
21 String str;
22 int val;
23
24 // Create an instance of the class
25
26 PassTest pt = new PassTest ();
27 // Assign the int
28 val = 11;
29
30 // Try to change it
31 pt.changeInt (val);
32
33 // What is the current value?
34 System.out.println ( " Int value is: " + val);
35
36 // Assign the string
37 str = new String ( " hello " );
38
39 // Try to change it
40 pt.changeStr (str);
41
42 // What is the current value?
43 System.out.println ( " Str value is: " + str);
44
45 // Now set the ptValue
46 pt.ptValue = 101.0f;
47
48
49 // Now change the value of the float
50 // through the object reference
51 pt.changeObjValue (pt);
52
53 // What is the current value?
54 System.out.println ( " Current ptValue is: " +
55 pt.ptValue);
56 }
57 }
System.out.println ( " Current ptValue is: " + pt.ptValue);这句输出为什么是99.0?