哪个更好
System.out.println("hello world");
或
String s="hello world";
System.out.println(s);
最佳答案
这个简单示例在内存分配方面没有区别。
关于java - 字符串内存分配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3361079/
标签 java
哪个更好
System.out.println("hello world");
或
String s="hello world";
System.out.println(s);
最佳答案
这个简单示例在内存分配方面没有区别。
关于java - 字符串内存分配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3361079/