Person p; p?.printInfo(); Person p1 = new Person('hhh', 20); p1?.printInfo();
收起
?. 就是对象不为空就继续调用后面的方法,为空就不调用。
报告相同问题?