package com.fgy.demo;

public class demo06 {
    public static void main(String[] args) {
        String str1 = "aaa ";
        String str2 = null;
        String str3 = " bbb";
        System.out.println(str1 + str2 + str3); // aaa null bbb
    }
}
// String源码
public static String valueOf(Object obj) {
        return (obj == null) ? "null" : obj.toString();
    }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-27
  • 2022-12-23
  • 2021-05-07
  • 2021-08-21
猜你喜欢
  • 2021-07-12
  • 2021-06-21
  • 2022-12-23
  • 2022-01-07
相关资源
相似解决方案