How to retain DOCTYPE declaration while saving DOM Document to an XML file

By Abhijit Ghosh on Sep 13, 2012 2:13:01 PM

If we save a DOM Document to an XML file using javax.xml.transform.Transformer, DOCTYPE declaration gets emitted by default. This example shows how we can retain PUBLIC and SYSTEM id of the DOCTYPE declaration for external DTD.


How to perform binary search on a java.util.ArrayList

By Abhijit Ghosh on Jul 14, 2012 11:22:17 PM

This example shows how an element of a java.util.ArrayList can be searched using 'binarySearch' method of java.util.Collections class. This method internally applies binary search algorithm to search a particular element.


About this 'Hello World' site

This site is mainly developed to share coding and technology learning experiences on java / j2ee based technologies.

Simple tutorials / codes have been shared to learn a new technology. Full source code is also available for download.