Consumer Java 8 Examples, how to use ?

In Java 8, Consumer is a functional interface, it takes an argument and returns nothing. An interface with just one abstract method is referred to as a functional interface. They are limited to displaying only one type of feature. Lambda expressions can be used to describe a functional interface instance starting with Java 8. Some examples of […]

En Lire Plus

Java : how to convert negative binary to Integer ?

Review the following Java example to convert a negative integer in binary string back to an integer type. The result is NumberFormatException ! The NumberFormatException is due to overflow, the string 11111111111111111111111111111111 (length of 32) are unable to fit into the 32 bits int type ? Note Note Integer has values from -2^31 to 2^31-1 […]

En Lire Plus

Writing Nashorn Command-Line Scripts with Nake

Nake is a simplified version of Make (Cake, Jake, Rake) for Java 8 based on the Nashorn Javascript Engine. I wrote Nake to automate common tasks in our daily project business here at Pondus. You define tasks in a project-specific Nakefile and call those tasks from the command line. Tasks are written in Javascript empowered […]

En Lire Plus

Patterns optionels

Patterns optionels : De nombreuses choses ont été introduites en Java 8 qui changent la façon de concevoir les applications et les API. Les lambdas bien sûr, l’API Stream également. Si tu es un habitué de ce blog, cher et précieux lecteur, tu es déjà au courant. Patterns optionels : Un autre élément a été […]

En Lire Plus