整数的valueOf

时间:2014-04-11 11:42:47

标签: integer

我们假设给出的方法

 public static Integer getVal()
     {
         return 10;
     }

getVal().valueOf(12);

我们知道它会返回12?

为什么它会返回12?

1 个答案:

答案 0 :(得分:1)

因为Interger.valueOf()是一个静态方法。