Melbourne is one of major cities in Australia and it very beautiful, greenery and specially for me it is more lovable place in the world. Even I couldn't get chance to visit Melbourne till today, I have observed many places in the web sites and TV channels and I loved it.
If I could get the chance to visit, the fist place I like to visit is the Cricket Ground. It is one of the biggest stadiums in the world with 100,000 seating capacity. Apart from the Cricket, it is very famous for the Foot ball. It's my dream place to visit since I habituated with watching and playing cricket.
The next place I would like to visit is the historical market i.e. QUEEN VICTORIA MARKET. I would like to taste the all the verities of Australian sea food items, vegetable food items and different fruits available in Australia and complete the shopping on lovable items.
One of my most lovable thing which I can't say by my mouth but just understand from below. Like to have one pe......g in Melbourne.
From childhood days I am hearing about 'Penguin', reading in books and watching in movies. So, I would like see the Penguins in Penguin Island and enjoy the moments.
You may have different taste than me or my like other things when compared to my interests. If you want to know more about Melbourne just visit : www.visitmelbourne.com/in.
Once you know more about Mebourne, I am sure you definately like to visit Melbourne and it will become a dream place to you. Finally I would like to say, "Melbourne is a city that knows how to live".
So...
…it's your time to visit Melbourne NOW!!!
Wednesday, September 5, 2012
Melbourne - Dream place to visit
Java, J2EE, Struts, Hibernate, Web Services, JSF
Australia Tourism,
Dream place to visit,
Melbourne,
Melbourne cricket stadium.
Create XML File in JAVA using DOM
package com.test;
import java.io.File;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class CreateXMLInJava {
public static void main(String argv[]) {
CreateXMLInJava createXml = new CreateXMLInJava();
createXml.createXML();
}
CreateXMLInJava createXml = new CreateXMLInJava();
createXml.createXML();
}
public void createXML() {
try {
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
try {
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
// root elements
Document doc = docBuilder.newDocument();
Element rootElement = doc.createElement(“Company”);
doc.appendChild(rootElement);
Document doc = docBuilder.newDocument();
Element rootElement = doc.createElement(“Company”);
doc.appendChild(rootElement);
// staff elements
Element staff = doc.createElement(“Dept”);
rootElement.appendChild(staff);
Element staff = doc.createElement(“Dept”);
rootElement.appendChild(staff);
// set attribute to staff element
Attr attr = doc.createAttribute(“id”);
attr.setValue(“1″);
staff.setAttributeNode(attr);
Attr attr = doc.createAttribute(“id”);
attr.setValue(“1″);
staff.setAttributeNode(attr);
// can be written as
// staff.setAttribute(“id”, “1″);
// staff.setAttribute(“id”, “1″);
// firstname elements
Element firstname = doc.createElement(“Firstname”);
firstname.appendChild(doc.createTextNode(“mallik”));
staff.appendChild(firstname);
Element firstname = doc.createElement(“Firstname”);
firstname.appendChild(doc.createTextNode(“mallik”));
staff.appendChild(firstname);
// lastname elements
Element lastname = doc.createElement(“Lastname”);
lastname.appendChild(doc.createTextNode(“Gunda”));
staff.appendChild(lastname);
Element lastname = doc.createElement(“Lastname”);
lastname.appendChild(doc.createTextNode(“Gunda”));
staff.appendChild(lastname);
// salary elements
Element salary = doc.createElement(“Salary”);
salary.appendChild(doc.createTextNode(“100000″));
staff.appendChild(salary);
Element salary = doc.createElement(“Salary”);
salary.appendChild(doc.createTextNode(“100000″));
staff.appendChild(salary);
// write the content into xml file
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
DOMSource source = new DOMSource(doc);
StreamResult result = new StreamResult(new File(“D:\\test.xml”));
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
DOMSource source = new DOMSource(doc);
StreamResult result = new StreamResult(new File(“D:\\test.xml”));
// Output to console for testing
// StreamResult result = new StreamResult(System.out);
// StreamResult result = new StreamResult(System.out);
transformer.transform(source, result);
System.out.println(“File saved!”);
} catch (ParserConfigurationException pce) {
pce.printStackTrace();
} catch (TransformerException tfe) {
tfe.printStackTrace();
}
}
}
pce.printStackTrace();
} catch (TransformerException tfe) {
tfe.printStackTrace();
}
}
}
Java, J2EE, Struts, Hibernate, Web Services, JSF
Create xml file using DOM,
DOM,
DOM XML parsing,
Java,
Java xml parsing,
xml parsing in java
Monday, September 3, 2012
Read .xls file in JAVA using POI API
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Iterator;
public class ReadExcelFileUsingPOI {
public static void main(String[] args) throws Exception {
String filename = "D:\\test.xls";
FileInputStream fis = null;
try {
fis = new FileInputStream(filename);
HSSFWorkbook workbook = new HSSFWorkbook(fis);
HSSFSheet sheet = workbook.getSheetAt(0);
Iterator rows = sheet.rowIterator();
while (rows.hasNext()) {
HSSFRow row = (HSSFRow) rows.next();
Iterator cells = row.cellIterator();
while (cells.hasNext()) {
HSSFCell cell = (HSSFCell) cells.next();
int type = cell.getCellType();
if (type == HSSFCell.CELL_TYPE_STRING) {
System.out.println("[" + cell.getRowIndex() + ", "+ cell.getColumnIndex()+"] = STRING;
Value = " + cell.getRichStringCellValue().toString());
} else if (type == HSSFCell.CELL_TYPE_NUMERIC) {
System.out.println("[" + cell.getRowIndex() + ", "+ cell.getColumnIndex()+"]=NUMERIC;
Value = " + cell.getNumericCellValue());
} else if (type == HSSFCell.CELL_TYPE_BOOLEAN) {
System.out.println("[" + cell.getRowIndex() + ", "+ cell.getColumnIndex()+"]=BOOLEAN;
Value = "+ cell.getBooleanCellValue());
} else if (type == HSSFCell.CELL_TYPE_BLANK) {
System.out.println("[" + cell.getRowIndex() +", "+cell.getColumnIndex()+"]=BLANK CELL");
}
}
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} finally {
if (fis != null) {
fis.close();
}
}
}
}
Java, J2EE, Struts, Hibernate, Web Services, JSF
Apache POI examples,
Create excel file using POI,
Example to read excel file using POI,
Java code read xls file using POI,
POI Examples,
Read excel file in Java,
read MS excel using Java
Sunday, September 2, 2012
Percentage calculation Example in Java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public final class Percent {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("enter the total no.of sub");
int n = Integer.parseInt(br.readLine());
int marks[] = new int[n];
int i, tot = 0;
for (i = 0; i < n; i++) {
System.out.println("enter ur marks");
marks[i] = Integer.parseInt(br.readLine());
tot = tot + marks[i];
}
System.out.println("total marks: " + tot);
System.out.println("percentage of marks: " + (float) tot / n);
}
}
Java, J2EE, Struts, Hibernate, Web Services, JSF
How to calcualte Percentage in Java,
Java,
Java examples,
Logic to calculate percentage in java,
Read data from Java console
Thursday, August 30, 2012
Create Excel File in Java using POI API
import java.io.FileOutputStream;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
public class CreateExcelFile {
public static final String FILE_NAME = "D:\\test.xls";
public void createExcelFile(String filename) {
try {
HSSFWorkbook hwb = new HSSFWorkbook();
HSSFSheet sheet = hwb.createSheet("Sheet1");
HSSFRow rowhead = sheet.createRow((short) 0);
rowhead.createCell((short) 0).setCellValue("S.No.");
rowhead.createCell((short) 1).setCellValue("Emp ID");
rowhead.createCell((short) 2).setCellValue("EMP Name");
rowhead.createCell((short) 3).setCellValue("Dept");
rowhead = sheet.createRow((short) 1);
rowhead.createCell((short) 0).setCellValue("1");
rowhead.createCell((short) 1).setCellValue("EMP1");
rowhead.createCell((short) 2).setCellValue("Mallik");
rowhead.createCell((short) 3).setCellValue("Java");
FileOutputStream fileOut = new FileOutputStream(filename);
hwb.write(fileOut);
fileOut.close();
System.out.println("Your excel file has been generated!");
} catch (Exception ex) {
System.out.println(ex);
ex.printStackTrace();
}
}
public static void main(String[] args) {
CreateExcelFile excelFile = new CreateExcelFile();
excelFile.createExcelFile(FILE_NAME);
}
}
Java, J2EE, Struts, Hibernate, Web Services, JSF
Create excel file using POI,
Excel file creation in Java,
How to create excel file in Java using POI,
Java code to create excel file using POI,
POI Examples,
xls file generation in JAVA using POI
Thursday, July 26, 2012
Get Answers for mathematical equations from Google Search
Every one know that Google is always coming up with the new inventions and trying to make the Google as life to the user in future. Below is one of the new invention from the Google.
Google has just released a new 34-button scientific calculator in the Google serch options. Go ahead and enter an equation into Google Search. Try 2+2. Now, instead of simply coming up with the answer, Google presents you with a full, 34-button scientific calculator. You can also find the answers for Trigonometric functions and 'Pi' functions
You can also access the calculator with Desktop Voice Search. Just click the little microphone icon in the search bar, speak your equation out loud and wait a split second for your answer. A pared-down version of the calculator also appears during mobile searches.
Today I have tested the calculator with the mathematical equations, triganometric functions and others..., it is amazing for me.
So, why to wait? start searching mathematical equations or mathematical functions in google.... Hope you will enjoy
Google has just released a new 34-button scientific calculator in the Google serch options. Go ahead and enter an equation into Google Search. Try 2+2. Now, instead of simply coming up with the answer, Google presents you with a full, 34-button scientific calculator. You can also find the answers for Trigonometric functions and 'Pi' functions
You can also access the calculator with Desktop Voice Search. Just click the little microphone icon in the search bar, speak your equation out loud and wait a split second for your answer. A pared-down version of the calculator also appears during mobile searches.
Today I have tested the calculator with the mathematical equations, triganometric functions and others..., it is amazing for me.
So, why to wait? start searching mathematical equations or mathematical functions in google.... Hope you will enjoy
Java, J2EE, Struts, Hibernate, Web Services, JSF
Google,
Google Calculator
Tuesday, July 24, 2012
Are you waiting for Windows 8 to use?
If you are eagerly waiting for new versions of windows with more features, this is the time to know about the windows 8. Every one knows that Microsoft gave a wonderful OS with Windows 7, but still people want more comfort level in using the Computers than earlier.
Microsoft has released a new version of Windows called Windows 8 with excellent features and functionalities. You can upgrade to new version of Windows or you can also purchase as a DVD copy from the stores and pricing will be different for different cases.
Most of the information you can find @ http://www.techgig.com/tech-news/editors-pick/How-can-you-get-Windows-8--13912
Java, J2EE, Struts, Hibernate, Web Services, JSF
upgrade to windows 8,
windows,
Windows 8,
windows 8 upgrade
Friday, July 20, 2012
Convert charr array to String in Java
1. We can convert char array to String by passing the array to String constructor.
public void convertCharArrayToStringOption1() { char[] charArray = new char[] { 'a', 'b', 'c', 'd' }; System.out.println("The new String Array is : "+new String(charArray));}
2. We can also pass the char array to 'valueOf()' static method of String class:
public void convertCharArrayToStringOption1() { char[] charArray = new char[] { 'a', 'b', 'c', 'd' }; System.out.println("The new String Array is : "+ String.valueOf(charArray));}
Java, J2EE, Struts, Hibernate, Web Services, JSF
Convert charr array to String in Java,
Java,
Java Variable conversions
Funtab Fit tablet launched at Rs 5,999
Delhi-based Go Tech has launched a health-oriented tablet called Funtab Fit at a price of Rs 5,999. This device comes with a host of pre-installed health-related apps, along with access for 1,500 books and 7,500 videos for students.
On the specifications front, Funtab Fit has a 7-inch display panel with 800x480 resolution, 1GHz processor, 512MB RAM, 32GB expandable memory, VGA camera and runs onAndroid v4.0.3 (Ice Cream Sandwich). The tablet with a 5-point capacitive touchscreen supports 1080p video playback and various audio and video formats.
It ensures continuous internet connectivity through Wi-Fi and 3G (via USB dongle). The tablet features USB-on-the-go support and can be used to read Word, Excel, PowerPoint, PDF and TXT files. Other notable features of Funtab Fit include multiple language support, 3D games and video output via HDMI cable. The tablet with a 3600mAh battery claims 8-hour battery life.
On the specifications front, Funtab Fit has a 7-inch display panel with 800x480 resolution, 1GHz processor, 512MB RAM, 32GB expandable memory, VGA camera and runs onAndroid v4.0.3 (Ice Cream Sandwich). The tablet with a 5-point capacitive touchscreen supports 1080p video playback and various audio and video formats.
It ensures continuous internet connectivity through Wi-Fi and 3G (via USB dongle). The tablet features USB-on-the-go support and can be used to read Word, Excel, PowerPoint, PDF and TXT files. Other notable features of Funtab Fit include multiple language support, 3D games and video output via HDMI cable. The tablet with a 3600mAh battery claims 8-hour battery life.
Thursday, July 19, 2012
Marker or Tag interface in java
An interface is called a marker interface when it is provided as a handle by java interpreter to mark a class so that it can provide special behaviour to it at runtime and they do not have any method declarations.
Java Marker Interface Examples
- java.lang.Cloneable
- java.io.Serializable
- java.util.EventListener
Why we need Marker Interface?
Suppose you want to persist (save) the state of an object then you have to implement the Serializable interface otherwise the compiler will throw an error. To make more clearly understand the concept of marker interface you should go through one more example.
Suppose the interface Clonable is neither implemented by a class named Myclass nor it’s any super class, then a call to the method clone() on Myclass’s object will give an error. This means, to add this functionality one should implement the Clonable interface. While the Clonable is an empty interface but it provides an important functionality.
We cannot create marker interfaces, as you cannot instruct JVM to add special behavior to all classes implementing (directly) that special interface.
From java 1.5, the need for marker interface is eliminated by the introduction of the java annotation feature. So, it is wise to use java annotations than the marker interface. It has more feature and advantages than the java marker interface.
Java, J2EE, Struts, Hibernate, Web Services, JSF
interface in java,
Java,
Marker interface in java,
tag interface in java
Subscribe to:
Posts (Atom)


.jpg)