jls

Java 8 Date Time API Usage

Introduction Every effort we put in to showcase the extent of Java 8 Date Time API usage leaves us only scratching the surface of it. This post walks through a couple of examples and some standard methods that can be helpful in daily use. Timezone aspects are not covered in this post. Refer to this post to for an introduction to Java 8 Date Time API. Old And The New Let us see how date formatting code changes with the new Java 8 Date Time API. If you landed directly on this post, we recommend reading this introductory post first. [crayon-5924829b17789810665032/] Goodbye ThreadLocals and c...
Read More

Java 8 Date Time API

What ailed Date and Time handling in Java? The existing java.util.Date and SimpleDateFormat are mutable and not thread-safe, more often than not, leading to concurrency issues for users. Having to deal with this overhead is not welcoming for novice developers. Inconsistent API (months starting at 1 while days start at 0), no ability to handle Time alone, no utilities like plus/minus dates lead to popularity of libraries like joda-time. Many enterprise products use joda-time, when date/time usage and manipulation should have been provided by the language which was in it's 7th iteration (person...
Read More

Java Virtual Machine Startup

In the last post we had a brief idea about the memory model of the Java Virtual Machine. We also came across certain terms like the Creation, Linking, Loading and Initialization of classes. In this post we will try to improve our understanding of all these terms. At the Java Virtual Machine Startup The JVM starts up by creating an initial class and loads it using the bootstrap class loader (we will learn about the class loader in another post). Some implementation of the JVM allow us to pass the name of the initial class using the command line. The JVM then links this initial class. L...
Read More