Core Java (All)

Important JDBC Core API Classes, Interfaces and Exceptions

The JDBC API is comprised of two Java packages: java.sql and javax.sql. The following are core JDBC classes, interfaces, and exceptions in the java.sql package:

Introduction to JDBC

JDBC is an API for accessing data in relational databases such as Oracle, MySQL etc. from Java in a standard way using the SQL language. JDBC actually lets you access any tabular data sources like relational databases, spreadsheets or even flat files. You pass SQL to java methods in the JDBC classes and get back JDBC objects that represent the results of your query. JDBC is portable since Java is portable across platforms. JDBC also allow us to access an ODBC-based database using a JDBC-ODBC bridge.  

My First JDBC Program


1. Downloading, installing and configuring the database

See the installation and configuration note for your database.

2. Create table and insert data as:

Create table employee(empName varchar(20), id int PRIMARY KEY)

insert into employee values (‘name1’,1)

insert into employee values (‘name2’,2)

Downloading, Installing and Configuring Java First Time

Here we will discuss the details of downloading, installing and configuring java for first time. You will first find the steps in writing followed by complete screenshots of these steps as a slideshow.

Best Practices for Multithreading in Java

This article lays down some of the best practices which you can use during your design or code reviews, and assumes that you are familiar with the basics of mutithreading in java available at articles/multithreading.

Access Modifiers in Java

Access modifiers are used to specify the accessibility or access levels of a type (class, interface) and its members (methods, variables and even constructors). There are three access modifiers and four access levels in Java. The three access modifiers are are private, protected and public. Four access levels (from most restricted to least restricted) are private, default (no modifier), protected and public. 

Path vs Classpath

The PATH environment variable contains a set of directories within the file system that the operating system uses to find executable files. When you type a command in command prompt, operating system will look for the corresponding executable in the current folder and then it will look inside every folder mentioned in the PATH environment variable in order. For instance, when you type javac, OS will search for java.exe within the current folder and then every folder mentioned inside in the PATH environment variable in order.

Main Method in Java

The main method is the entry point to a desktop based core Java application.

Previously, we created our first Java program "" as:

public class Hello {

  public static void main(String[] args)





We then compiled it using javac as:


We then executed it as:

java Hello

And output was:


Methods in Java

A class represent the properties and behabiour of an object. An methods represent these behaviours.

JDK, JRE, JVM, and Your First Java Program

Read about JDK, JRE, JVM, classes, objects and methods in brief and write, compile and execute your first java program. Discusses why Java is called as a compiled interpreted language and also why java is platform independent.


Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within!!!