JAVA基础1:面向对象
?
字符串:
package com.test.base;public class StringTest {public static void main(String[] args) {String s1 = new String("aaa");String s2 = new String("aaa");System.out.println(s1 == s2);}}
?打印结果为false,下图为分析过程