Escape Characters in Java
n New line t Tab b Backspace r Carriage return f Formfeed \ Backslash ' Single quotation mark " Double quotation mark d Octal xd Hexadecimal ud Unicode character
n New line t Tab b Backspace r Carriage return f Formfeed \ Backslash ' Single quotation mark " Double quotation mark d Octal xd Hexadecimal ud Unicode character
this java program gives the system home path as output. /** * * @author katta vijay */ public class UserHomeExample { public static void main(String[] args) { System.out.println(“User Home Path: “+ System.getProperty(“user.home”)); } }
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author vijay * */ import java.net.URL; 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; public class RSSReader { private static RSSReader instance = null; private RSSReader() {…
Both JAR and WAR are created(Zipped) with Java JAR tool , both have different purposes. JAR – Java Archive this JAR file may be a standalone java application or a zipped source . this file contains classes , libraries , property files Command to create a JAR file : here i want to create JAR…
Following four ways are used to retrieve elements from collection object : Using for-each loop. Using Iterator Interface. Using ListIterator interface. Using Enumeration Interface. For-each loop : for-each loop is like for loop which repeatedly executes a group of statements,for each element of collection the format is for(variable:collection object) // for( String values: os) {…
we are using property file to store some organized data, like database url and connection username etc., reading from this property file is easy and useful myproperties.properties // my properties file name it`s contain name=katta vijay age=24 email=mail@javamix.net Main.java // to read data from property file package javamixposts; import java.io.*; import java.util.*; /** * *…
what is ant tool ? 1) Ant is a java based build tool to automate build process. more clearly says … Ant is an open-source Java-based build tool from the Apache Software Foundation. It’s rapidly become the build tool for J2EE projects, so for developers, it’s certainly worth becoming familiar with the basics of Ant,…