Monthly Archives: January 2012

equals() and hashCode() methods of Object Class

HashTable, HashMap and HashSet are the Collection classes in java.util package that make use of hashing algorithm to store objects. In all these Collection classes except HashSet, objects are stored as key-value pairs. For the storage and the retrieval of

Tagged with: , , , ,
Posted in JAVA

Sorting of int values in an array

package in.javatutorials.test; public class ManualSorting { int[] arr = { 12, 1, 3, 22, 222, -9 }; public void ascendingOrder() { for (int i = 0; i < arr.length; i++) { for (int j = i + 1; j <

Tagged with: , , ,
Posted in JAVA

Read Properties file in Java

package com.test; import; import; import; import java.util.Enumeration; import java.util.Locale; import java.util.Properties; import java.util.ResourceBundle; public class ReadPropetiesFile { public static void main(String a[]){ String fileName = “”; ReadPropetiesFile readProp = new ReadPropetiesFile(); readProp.readProperties(fileName); } public void readProperties(String fileName){

Tagged with: , ,
Posted in JAVA

SAX Parser Example in JAVA

package com.test; import; import java.util.Enumeration; import java.util.Locale; import java.util.ResourceBundle; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.Attributes; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; public class ParseXMLUsingSAX { public static String xmlString = “<?xml version=’1.0′?><EMPLOYEE><USER_ID>admin</USER_ID><PASSWORD>admin123</PASSWORD></EMPLOYEE>”; public static void main(String argv[]) { String

Tagged with: , , ,
Posted in JAVA

XML Parsing Example using DOM in Java

package com.test; import; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.CharacterData; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; public class XMLParsing {   public static void main(String arg[]) throws Exception{ String xmlRecords = “<data><employee><name>A</name>” + “<title>Manager</title></employee></data>”;    

Tagged with: ,
Posted in JAVA

Introduction to RESTful Web Services

REST is a “Representational state transfer” and it is firstly introduced by Roy Fielding (Fielding is one of the principal authors of the HTTP specification and a co-founder of the Apache HTTP Server project) in his 2000 doctoral dissertation. REST-style

Tagged with: , , , , ,
Posted in Web Services

Happy to share 2011 in review

The stats helper monkeys prepared a 2011 annual report for this blog. Here’s an excerpt: The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 15,000 times in 2011. If it were a

Posted in About

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 683 other followers

January 2012
Mallikarjun Gunda

This is Mallikarjun Gunda, I am working as a software professional. Blogging is my Passion. This blog contains the posts on Java related technologies and programming languages. I am happy to share my knowledge through the blogs.

Blog Stats
  • 331,789 hits