Loading...
replaceAll()方法为什么说它特殊呢,因为它传入的参数我是第一次见过,如下default void replaceAll(UnaryOperator operator)对于该方法,Java jdk1.8手册里是这么描述的/** * 用函数接口的返回结果替代原list中的值. * * 此方法等价实现代码如下: * final ListIterat...
Exceptions处理异常及错误。举例,电话类public class Phone { private String phoneType; private String phoneNumber; public Phone(String phoneType, String phoneNumber) { if (phoneType == null ||...
产品接口,有location抽象方法public interface Production { public String location(); }交通工具接口,有getType、getSpeed、getColor抽象方法public interface Vehicle { public String getType(); public String getS...
Person 类public class Person { private String firstName; private String lastName; public Person(String firstName, String lastName) { super(); this.firstName = firstName;...
人常会不自觉地记下对自己有利的部分,这是形成委屈的重要原因