Posts

Showing posts from 2017

The 9 New Developer Features in Java 9

Image
The big new features in JDK 9 is the Java Platform Module System coupled with the introduction of the modular JDK. However, there are plenty of new features in JDK 9, and in this article, I focus on nine that are of particular interest to developers. Where applicable, I've included the relevant JDK Enhancement Proposal (JEP) numbers so you can find more information. No 1. Factory Methods for Collections (JEP 269) Collections provide a well-understood way for you to gather together groups ( I was going to say sets , but that could be a bit misleading) of data items in your applications and then manipulate the data in a variety of useful ways. At the top level, there are interfaces that represent the abstract concept of a List, Set, and Map. The problem, until now has been that Java doesn't provide a simple way to create a collection with predefined data. if you want a collection to be structurally immutable (that is, you can't add, delete, or change the refer...
Image
How to write and read excell files in java Enterprise systems developers very frequently find themselves in a situation whereby they need to generate PDF, excel, word, CSV and other file formats to present the data from their products or systems. Going down to the primitive JDK I/O facility becomes somewhat of a nightmare and this creates the need for a third party library that has the required implementation that facilitates this growing need. For pdf documents the most advisable and frequently use open source Library is iText. iText is an open source pdf generation library developed by Apache Software Foundation. In this tutorial, we are going to explore writing and reading a pdf file with Apache POI. Step 1. Download Apache POI  You can find and download Apache POI from the official   download site  . Step 2. Add the jar file to your Project libs folder. This step depends on the IDE you are using for your development. This tutorial expl...