Building DOM tree by reading an xml file in Java

import java.io.*; import javax.xml.parsers.*; import org.w3c.dom.*; import org.xml.sax.*; public class BasicDom { public static void main(String[] args) { Document doc = parseXmlFile(“infilename.xml”, false); } // Parses an XML file and returns a DOM document. // If validating is true, theContinue reading… Building DOM tree by reading an xml file in Java

Difference between String str=”abc” and str=new String(”abc”)?

1) using new operator:- String st=new String(“abc”); 2) Without using new operator:- String st=”abc”; Once string object is created with or without new operator contents of string object cannot be modified. But we can modify String reference variable. when youContinue reading… Difference between String str=”abc” and str=new String(”abc”)?

Java Common Utils: Creating a stored procedure or function in an Oracle Database

A stored procedure or function can be created with no parameters, IN parameters, OUT parameters, or IN/OUT parameters. There can be many parameters per stored procedure or function. An IN parameter is a parameter whose value is passed into aContinue reading… Java Common Utils: Creating a stored procedure or function in an Oracle Database

Java Common Utils: Calling a Stored Procedure in a Database (Oracle)

This example demonstrates how to call stored procedures with IN, OUT, and IN/OUT parameters. CallableStatement cs; try { // Call a procedure with no parameters cs = connection.prepareCall(“{call myproc}”); cs.execute(); // Call a procedure with one IN parameter cs =Continue reading… Java Common Utils: Calling a Stored Procedure in a Database (Oracle)