Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

 

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

 

and many more ....

 

 

JDBC with Oracle Thin Driver Example

Java Database Connectivity (JDBC) is a Java-based data access technology that defines how a client may access a database. It provides methods for querying and updating the data in a database. The JDBC classes are contained in the Java package i.e. java.sql and javax.sql. 1. Introduction In this JDBC Oracle connectivity example, we will see how to setup a JDBC ...

Read More »

JDBC ResultSetExtractor Example

Spring provides a simplification in handling database access with the Spring JDBC Template. The org.springframework.jdbc.core.ResultSetExtractor interface is a callback interface used by JdbcTemplate’s query methods. Implementations of this interface perform the actual work of extracting results from an SQL ResultSet object. In this article, we will try to show how the ResultSetExtractor mechanism can be applied to a Java application. 1. ...

Read More »

Logging System.out.println Results in a Log File Example

In Java the three main streams stdin (Standard Input), stdout (Standard Output), and stderr (Standard Output Error) are handled by default by System.in, Sytem.out, and System.err respectively. In this example, we will try to show how to redirect the System.out.println() to a log file using Log4j logging services. 1. Introduction Printing messages to the console is an integral part of ...

Read More »

JDBC DDL Example

Data Definition Language (DDL) is a unique set of SQL commands that lets you manipulate the structure of the database. In this article, we will try to show how the JDBC DDL mechanism can be applied to a Java application. 1. Introduction It might sound like its own programming language, but Data Definition Language (DDL) is really a way to ...

Read More »

JDBC Connection Pool Example

Connection pooling is a mechanism to create and maintain a collection of JDBC connection objects. The primary objective of maintaining the pool of connection object is to leverage re-usability and improve the overall performance of the application. In this article, we will try to show how connection pooling mechanism can be applied to a Java application. 1. Introduction JDBC stands ...

Read More »

JUnit doNothing Example

In this tutorial we shall show users the usage of doNothing method. This method is basically resides inside the Mockito framework and is not a part of the JUnit. 1. Introduction Many developers thought about the ways to test methods but do nothing about this. They might want to run the method only for the purpose of some other things ...

Read More »

SNMP Walk Example using SNMP4J

This article is pretty straightforward. It’s an SNMP walk example using SNMP4J. SNMP is used in managing and monitoring network devices. It is an Internet standard protocol for managing devices on IP networks. 1. Tools and Prerequisites SNMP4J library Mars Eclipse 2. Create the Project You may skip this process because this is a fairly simple example which can be ...

Read More »

JDBC Best Practices Tutorial

Hello, in this tutorial we will learn some Java Database Connectivity (JDBC) best practices that Java programmer should follow while writing JDBC code. JDBC API is used to connect and interact with the relational databases to perform CREATE, READ, UPDATE, DELETE (commonly known as CRUD) operations. It is a database-independent API that you can use to execute your queries against ...

Read More »

JUnit Example for Spring Controller

In this example, we shall show users the usage of JUnit Spring Controller Example. There are many ways where we can test Spring controller. There is also a specific test framework, especially for Spring. Spring-Test is especially built for the Spring testing and we will be using it for the testing of the spring controller in our example below. 1. ...

Read More »

Hibernate Example Code Using Annotations

Hibernate annotations is the powerful way to provide the metadata for the Object and Relational Table mapping. All the metadata is clubbed into the POJO Java file along with the code which helps the user to understand the table structure and POJO simultaneously during the development. In this tutorial, we will explain how to configure Hibernate annotations to define mapping ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns