Blog Archives
1 … 20 21 22 23 24 25 26 27 28 … 30

Groovy console for beginner and meta programming

This assumes that you have setup groovy as per Setting up Groovy and groovysh beginner for eval exp, dynamic typing, operator overloading & closure.

Step 1: Start the groovyConsole from a command prompt

Step 2: Run the following Groovy Plain Old Object code

Execute it as a Groovy script.

…

Read more ›



groovysh beginner for eval exp, dynamic typing, operator overloading & closure

This assumes that you have setup groovy as per Setting up Groovy.

#1: Running groovysh

You can now type your expressions on the “groovy:000>” prompt like

Q1.

…

Read more ›



Handy DOS commands for Java developers

Q. How will you copy files more robustly in DOS?
A. Using the Robocopy (stands for Robust File Copy) or Xcopy command line utilities. Check for its options with “robocopy /?“.

Q.

…

Read more ›



Hibernate Query Language (HQL) tutorial

Step 1: The ER diagram showing the relationships among the tables. The column names and types are omitted to keep it simple. Step 2: The basic table details. The UserApp table uses “UserName” … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Hibernate tutorial with HSQLDB

This tutorial is basically an extension to the “Setting up” Java” and “JDBC tutorials”. Hibernate is an ORM (Object to Relational Mapping) tool. Step 1:  First step is to bring in the relevant Hibernate framework jar files like hibernate-xxx.jar, hibernate-annotations-xxxx.jar, … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Invoking a Pentaho DI (i.e. Kettle) transformation from Java

Step 1: Assumes that you have gone through the Part-1: Pentaho with user defined Java transformer tutorial. In this tutorial, we will execute the ETL transformation created via Kettle in Part-1. Step 2: The “pom.xml” file to include Pentaho Data Integration (i.e. … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Java and JAXB Tutorial – Marshaling

This blog posts extends Java and JAXB tutorial: Unmarshalling.

Q. Can you create your Java objects from XSDs?
A. Yes, you can by binding a schema. Binding a schema means generating a set of Java classes that represents the schema.

…

Read more ›



Java and JAXB tutorial – unmarshalling

Q. What does JAXB stand for? What is an XML Binding?
A. JAXB means Java API for Xml Binding. XML binding maps an XML to in-memory Java objects. The principle advantage of using JAXB when marshaling and demarshaling XML is that is simplifies the programming model by allowing us to simply annotate a few POJOs and use the JAXB API’s and you can serialize to XML and deserialize from XML very easily.

…

Read more ›



Java and JSON tutorial with Jackson library

Q. What is JSON and when to favor it over XML? A. JSON (JavaScript Object Notation) is a lightweight, text-based, language-netral like XML, but less verbose than XML data exchange format. JSOJ is used in Web services to exchange data between client and server. … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Java and XML tutorial with DOM Parser

Q. What is a DOM parser, and when will you use it? A. The Java DOM API for XML parsing is intended for working with small to medium XML documents as an object graph in memory. The DOM parser traverses the XML file and creates the corresponding DOM objects linked together...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Java and XML tutorial with SAX parser – reading only

Q. What is a SAX Parser and when will you use it? A. SAX  (Simple API for XML) is a stream oriented API like StAX, but Unlike StAX, which can read and write, but SAX can only read. … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Java and XML tutorial with StAX parser – reading

Q. What is a StAX Parser and when will you use it?
A. The StAX Java API for XML processing is designed for parsing XML streams, just like the SAX API’s, but

  • StAX is a “pull”

…

Read more ›



Java and XML tutorial with Stax Parser – writing cursor based and iterator based

Here is a simple example to write employee object to XML using simpler cursor based approach.

Output:

Here is a simple example to  … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


1 … 20 21 22 23 24 25 26 27 28 … 30

300+ Java Interview Questions - FAQs

Tutorials on Java & Big Data