Master List Of Code Snippets
XML Parsing Using SAX File Operations Experimenting with java.util.Date. Using java.lang.reflect.* APIs Using java.lang.Comparabl...
XML Parsing Using SAX File Operations Experimenting with java.util.Date. Using java.lang.reflect.* APIs Using java.lang.Comparabl...
Log4j configuration can be done either using an XML or a properties file externally. This makes your code independent of logging related ste...
In this post, a code snippet describing a basic integration of XML with Velocity framework. Please ensure all runtime jar files associated w...
Velocity Framework helps in creating a pre-formatted template based email response mechanism. The code snippet in this post elaborates how o...
import java.util.regex.Matcher; import java.util.regex.Pattern; public class RegularExpressionExample { /** * @param args */ public static...
import java.security.Security; import java.util.Properties; import javax.mail.Message; import javax.mail.MessagingException; import javax....
In order to write content to an MS Excel sheet you are required to download JExcel APIs from here . package example; import java.io.File; ...
import java.text.DateFormat; import java.util.Date; import java.util.Locale; public class LocaleDate { /** * @param args */ public...
This code snippet shows parsing of an XML document using SAX parser. import java.io.File; import org.w3c.dom.Document; import org.w3c.dom.*...
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileOutput...
import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Experimentin...
import java.lang.reflect.*; public class ReflectionExample { public static void main(String args[]) throws Cl...
import java.util.Arrays; class Employee implements Comparable { String empName; String empCode; int totalMarks; double totalSalary; /*...
Explain following code snippet: class ThreadInterrupted extends Thread { public void run() // called when start method executes. { System.o...
The following code snippet gives you the IP address on the basis of Hostname: InetAddress inetAddress = InetAddress.getByName("www.in...