Create spring application in Eclipse

In this tutorial, i show you how to create spring application in Eclipse. It’s a simple application of spring framework and help you have a first look about this powerful framework. Firstly, you should have Eclipse IDE on local computer if you have not yet, please download the lastest version from webapge eclipse.org To create … Read more

Read & write file using Gson streaming

You could read & write file using Gson streaming. It is a powerful feature of Gson. Gson Streaming API is based on sequential read & write standard. And JsonWriter & JsonReader are core classes built for Streaming Write and Read in Streaming API. I show you how to use JsonWriter and JsonReader via two programs … Read more

Parse json string and java object into Gson tree model

GSON Tree Model API provides JsonParser help you parse Json string to tree model of JsonElement. Beside, JsonElement provides method isJsonXXX() and getAsYYY() to check type of Json element and get value of element on that tree node. On the writing, Gson Tree Model API provides method toJsonTree help you converts a java object into … Read more

Sort arraylist and collection in java (Comparable and Comparator)

This tutorial shows the use java.lang.Comparable and java.util.Comparator to sort arraylist and collection in java. The arraylist or collection may contain primitive data, string or user defined object. Here is is a good subject for any java programmer. Because if you know and understand how to sort arraylist and collection in Java(Comparable and Comparator) you … Read more

Create instance using class name in Java

You can create instance using class name if Java knows about the class (the class is stored somewhere of the classpath, ie) within the application context. Thus, you can get a reference to this Class and instantiate an its object via the Class class. This technique is applied in many frameworks, web container, for example … Read more

Please share it if you found this useful
Hide Buttons