Java 8 Tutorial: Optional Optional là 1 container được giới thiệu trong Java 8, theo quảng cáo của Oracle thì nó sẽ giúp cho các lập trình viên tránh được cơn ác mộng NullPointerException. Nhưng theo mình thấy thì thay vì kiểm tra null bằng cách thông thường, Optional cung cấp 1 số hàm, tiện … Continue reading Java 8 Tutorial: Optional
Tag: Optional
Deep dive into Optional class API in Java 8
We all as Java programmers been through the situation where in we invoke a method to get some value and then instead of directly invoking some methods on the return value, we first have to check that the return value is not null and then invoke the methods on the return value. This has been … Continue reading Deep dive into Optional class API in Java 8