Core Java

JVM Shutdown Hook

Java JVM provides you a hook to register a thread with the shutdown initiation sequence. Once a thread is registered, on every shutdown that thread is run. JVM’s shutdown sequence has two phases. All registered shutdown hooks are started in some unspecified order and allowed to run concurrently until they finish. All un-invoked finalizers are [...]

Externalizable vs Serializable

Externalizable is an interface that enables you to define custom rules and your own mechanism for serialization. Serializable defines standard protocol and provides out of the box serialization capabilities. Externalizable extends Serializable. Implement writeExternal and readExternal methods of the Externalizable interface and create your own contract / protocol for serialization. Saving the state of the [...]

serialVersionUID in Java Serialization

serialVersionUID is used to ensure that during deserialization the same class (that was used during serialize process) is loaded. This is a one line definition to explain why a serialVersionUID is used? Apart from the above definition there are quite  a few things to learn from this serialVersionUID. As per javadocs, following is format of [...]

Java Versions, Features and History

A popular interview question in java is “what is new in Java version X?”. Is that an intelligent question is debatable. I have summarized below important new features added in each major java release till now. I target to highlight important features added in respective release. Apart from below list of features, every release has [...]

Install Java in Linux (Ubuntu / Debian)

This manual is to help install java (jdk) in Ubuntu / Debian Linux. Previously we discussed about how java’s installation has evolved over a period, then I promised to write an article on installing java on Linux. Yes I love Linux! Before install you should be aware of couple of things. Which package I need [...]

Customize Default Serialization Protocol

Do you know how to customize the default behaviour of the serialization protocol? Tom Cruise starrer MI4 hits theatres this week in India and we experience unusual media frenzy. In no way this is realted but by impulse I mention about MI4 here. In this article I am going to write on how to customize [...]

Object Construction in Serialization

My previous article on exploring java serialization is a box office hit. In continuation to that and popular request, I am going to write on how instances are created during serialize and de-serialize process. There is a mystery. If you strongly believe that the constructor of a class is called everytime when an object is [...]

Install Java

It feels great when you use a product for a long time. In your regular life there are things like a pen, a bike, a camera … which you use over and over (the same old pen, the same brand etc.) Suddenly I had a thought to install java using jdk1.1 and write a couple [...]

Java Binary

Have you ever wondered what is inside a java class file? Java source file is compiled into a binary class file. JVM specification states many rules on how a java binary class should be in order to provide binary compatibility. These binary files are used in a java virtual machine for execution. Java bytecode (instruction [...]

Email:

about
I am Joe, author of this blog. I run this with loads of passion. If you are into java, you may find lot of interesting things around ...more about me. Google+
java badge
Home