Home » Tag Archives: Java 8 (page 12)

Tag Archives: Java 8

How not to use Java 8 default methods

java-logo

Warning: you can not make this unseen once you have read I was talking about the multiple inheritance of default methods in the last blog article and how they behave during compilation and run time. This week I look at how to use default methods to do real inheritance, which actually, default methods were not designed for. For this very ...

Read More »

Java 8 default methods: what can and can not do?

java-logo

What default method is With the release of Java 8 you can modify interfaces adding new methods so that the interface remains compatible with the classes that implement the interface. This is very important in case you develop a library that is going to be used by several programmers from Kiev to New York. Until the dawn of Java 8 ...

Read More »

How to process stream and read text file in Java 8

java-logo

I have converted one of my old utility class using latest Java8. I use this often to print content of manifest file to check any mysterious jar file for version etc. Just run “java ztools.PrintJar /path/to/my.jar” to see output. In the new code, you will see how I use the Java 8 stream processing to filter what I need from ...

Read More »

Java 8 Date Time API Tutorial : LocalDateTime

java-logo

This blogpost is a part of tutorial series on Date Time API introduced in Java 8. In this blogpost I will go over some of the methods available in LocalDateTime class. LocalDateTime is an immutable, thread safe object which represents date-time without a time-zone in the ISO-8601 calendar system, such as 2014-03-30T02:51:21. It is normally represented in year-month-day-hour-minute-second and provides accuracy ...

Read More »

Add Java 8 support to Eclipse Kepler

eclipse-logo

Want to add Java 8 support to Kepler? Java 8 has not yet landed in our standard download packages. But you can add it to your existing Eclipse Kepler package. I’ve got three different Eclipse installations running Java 8: A brand new Kepler SR2 installation of the Eclipse IDE for Java Developers; A slightly used Kepler SR1 installation of the ...

Read More »

Java 8 Friday: Optional Will Remain an Option in Java

java-logo

At Data Geekery, we love Java. And as we’re really into jOOQ’s fluent API and query DSL, we’re absolutely thrilled about what Java 8 will bring to our ecosystem. Java 8 Friday Every Friday, we’re showing you a couple of nice new tutorial-style Java 8 features, which take advantage of lambda expressions, extension methods, and other great stuff. You’ll find ...

Read More »

Abstract Class Versus Interface in the JDK 8 Era

java-logo

In The new Java 8 Date and Time API: An interview with Stephen Colebourne, Stephen Colebourne tells Hartmut Schlosser, “I think the most important language change isn’t lambdas, but static and default methods on interfaces.” Colebourne adds, “The addition of default methods removes many of the reasons to use abstract classes.” As I read this, I realized that Colebourne is ...

Read More »

Base64 in Java 8 – It’s Not Too Late To Join In The Fun

java-logo

Finally, Java 8 is out. Finally, there’s a standard way to do Base64 encoding. For too long we have been relying on Apache Commons Codec (which is great anyway). Memory-conscious coders will desperately use sun.misc.BASE64Encoder and sun.misc.BASE64Decoder just to avoid adding extra JAR files in their programs, provided they are super sure of using only Sun/Oracle JDK. These classes are ...

Read More »

Introduction to Nashorn

javascript-logo

Java 8 introduced and new javascript engine named “Nashorn”. Nashorn is based on Da Vinci Machine, a project with aim of adding dynamic language support to JVM. Nashorn is a nice milestone to make the hybrid softwares easier than before. The nice features of this engine makes you able to make a full duplex communication between your java (any other compiled ...

Read More »

Java 8’s Functional Fomentation

java-logo

Java 8 has revolutionized Java. It’s easily the most significant release of Java in the last 10 years. There are a ton of new features including default methods, method and constructor references, and lambdas, just to name a few. One of the more interesting features is the new java.util.stream API, which as the Javadoc states, enables   functional-style operations on ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.