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