Java 8 tutorial: Cơ bản về Lambda Expression Cuối cùng thì Lambda Expression đã xuất hiện trong phiên bản J2SE 8. Nếu đã làm qua các ngôn ngữ khác như: C#, Ruby, các bạn có thể đã biết được Lambda Expression là gì. Trong Java, xuất hiện một khái niệm mới là SAM (Single Abstract … Continue reading Java 8 tutorial: Cơ bản về Lambda Expression
Tag: Java
Hướng dẫn lập trình Java 8 trên Eclipse
Hướng dẫn lập trình Java 8 trên Eclipse Để lập trình trên Java 8 trên Eclipse, các bạn cần làm 1 số việc như sau: Download JDK 8 Download Eclipse version suports Java 8 Tạo 1 project và test Trước tiên, các bạn vào trang chủ Oracle để download bộ JDK mới nhất về và … Continue reading Hướng dẫn lập trình Java 8 trên Eclipse
Exception Handling Templates in Java
Correct Error Handling is Tedious to Write Correct exception handling code can be tedious to write. Try-catch blocks also clutter the code and makes it harder to read. Look at the example below: In this example no exceptions are lost. If an exception is thrown from within the try block, and another exception is thrown … Continue reading Exception Handling Templates in Java
Java 8 explained: Default Methods
In a previous post, we looked into lambdas in Java 8 which proved to be a very popular topic. Now we continue our peek into new Java 8 features by continuing with default methods. Those are closely related to lambdas, which could be the main theme of Java 8. In this article, we’ll take a look at what default methods … Continue reading Java 8 explained: Default Methods
Java 8: The First Taste of Lambdas
Project Lambda is the major theme in the upcoming Java 8 and probably the most awaited one among Java developers. There’s one interesting feature that is being added to Java along with lambdas – the defender methods. In this blog post my intention is to look under the covers – to see how lambdas are represented … Continue reading Java 8: The First Taste of Lambdas
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
Java NIO qua một vài ví dụ
Java quá chậm, "biết rồi khổ lắm nói mãi", đây là một trong những điểm yếu lớn trên một vài công nghệ của Java và I/O là một ví dụ điển hình. Là một nhà phát triển ứng dụng, bạn luôn phải đau đầu với những kêu ca từ khách hàng khi quá trình đọc … Continue reading Java NIO qua một vài ví dụ
Tôi học Java
Rất nhiều người tìm đến với Java là do yêu cầu của dự án, chẳng hạn cần 1 website viết bằng JSP + Oracle, nghiên cứu uPortal hoặc những sinh viên muốn viết game cho mobile. Họ bắt đầu học Java như thế đấy. Java đúng là mênh mông thật, rất nhiều, rất nhiều công … Continue reading Tôi học Java
Cuộc chiến giữa JAVA và DotNET, bạn chọn bên nào?
Hiện nay trong thế giới phát triển phần mềm, có 2 ngôn ngữ lập trình lớn nhất đó là JAVA và DotNET (VB, C#,…) người phát triển phần mềm cũng chia làm 2 phe khá rõ ràng. Dưới đây là một số so sánh giữa JAVA và .Net. (Những so sánh này không mang tính … Continue reading Cuộc chiến giữa JAVA và DotNET, bạn chọn bên nào?
Why extends is evil
Improve your code by replacing concrete base classes with interfaces The extends keyword is evil; maybe not at the Charles Manson level, but bad enough that it should be shunned whenever possible. The Gang of Four Design Patterns book discusses at length replacing implementation inheritance (extends) with interface inheritance (implements). Good designers write most of their code in terms … Continue reading Why extends is evil