How to programmatically check wheather Java is 32 bit or 64 bit 178
To check if the JVM of my application runs in 32 bit or 64-bit mode, following are the options

continue reading...

Free Restful web service to get location geolocation by IP address 4633
Free rest web serivce to convert ip to location / geo location.

continue reading...

How to convert or parse a number String to Integer in Java 296
There are multiple ways to convert a number string to equivalent Integer value in Java. Below are the ways to get it done.

continue reading...

Java - How to create and initialize a List ArrayList in efficient way 404
Here are some better way to Create and initialize a ArrayList or List in Java. These are convenient methods if you want to initialize the list with fixed set of elements.

continue reading...

Working with Date and Time API - Java 8 Feature 1408
A new java.time package is introduced in Java SE 8 for date and time handling. Let us try to understand that what are new features and why a separate API was required for date and time handling..

continue reading...

RESTful web-service to get and search States and territories of a Country 7303
Here is a RESTful web service to get and search states and territories of a country. This web service can be used for testing, learning or can be consumed for any web application.

continue reading...

Lambda Expressions - Java 8 Feature 702
Lambda expression is the one of major change in Java 8.0 after Generics, Annotations in Java 5.0. Lambda expressions are anonymous method similar to anonymous classes in Java.

continue reading...

Difference between ArrayList and LinkedList 392
LinkedList and ArrayList both are ordered collections and implements List interface. These two Arraylist and linkedlist implementation has their own advantage and disadvantages and should be used based on the need. Here is a comparison and difference between these two implementations.

continue reading...

Optimizing for loop in Java 231
Loops are one of most expensive part of a program. If there are any unnecessary statement inside the loop, it may reduce the performance. There are various points if we care, while coding then we can improve the performance. The main focus area of optimization is to fine-tune conditions, use fast operators, object creations etc.

continue reading...

How to serialize and deserialize Java Object to XML using Xstream 3365
Many times we need to convert a Java object to XML string or xml string to object, in that case Xstream is good choice specially if we are working with third party Java classes where we don't have source of class to change.

continue reading...




© Copyright 2016