Unboxing Long in java

前端 未结 9 1408
别跟我提以往
别跟我提以往 2021-01-15 16:44

In some code I see this:

private void compute(Long a, Long b, Long c) {
        long result = a-(b+c);
...
         


        
9条回答
  •  庸人自扰
    2021-01-15 17:11

    Based on your needs.I mean the decelaration.

    Autoboxing and unboxing can happen anywhere where an object is expected and primitive type is available

提交回复
热议问题