A marker or tagging interface is an interphase with no methods. It can be created by ANYBODY. the purpose of these interfaces is to create a special type of Object, in such a way that you are restricting the classesContinue reading… Core Java: marker interface
Category: Java
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”)?
Reading and Writing Excel Files with POI
In this article we’ll show you how to read and write Excel files and how to read any Microsoft file’s document properties. Conventions The POI project is nearing a 2.0 release and is in a stage of rapid development, withContinue reading… Reading and Writing Excel Files with POI
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)
Java Common Utils: Reading and writing text files
When reading and writing text files : it is almost always a good idea to use buffering (default size is 8K) it is often possible to use references to abstract base classes, instead of references to specific concrete classes thereContinue reading… Java Common Utils: Reading and writing text files