Java

SAX Parser to read XML file in Java

Simple API for XML (SAX) is an event driven, serial access mechanism for accessing XML documents. SAX is the fastest and least memory intensive mechanism for dealing with XML documents. An application that uses SAX provides an instance of handler class to the parser. When the parser detects XML constructs, it calls the methods of …

SAX Parser to read XML file in Java Read More »

Singleton pattern in Java

Approaches to implementing Singleton pattern in Java Singleton is a creation design pattern to provide one and only instance of an object. In simple terms to achieve a singleton we need to (1) make the constructors of the class private, (2) create and store the object privately and (3) provide access to the created instance …

Singleton pattern in Java Read More »