[M P Dm] Method invokes toString() method on a String [DM_STRING_TOSTRING]

Calling String.toString() is just a redundant operation. Just use the String.

 

对一个String对象使用了toString()方法,这种操作是多余的,完全可以去掉。

public static void main(String args[]) throws Exception{
        String str 
= "123";
        System.out.println(str.toString());
}

 

 

相关文章:

  • 2021-07-12
  • 2021-06-27
  • 2022-12-23
  • 2021-09-23
  • 2021-05-20
  • 2021-08-05
  • 2021-08-05
  • 2021-07-06
猜你喜欢
  • 2021-05-27
  • 2021-08-11
  • 2021-08-13
  • 2021-11-29
  • 2021-05-26
  • 2021-06-01
  • 2021-06-20
相关资源
相似解决方案