Connecting Java and MySQL

Hi

As you all know Java is one of the best programming languages around and MySQL is the world’s most popular open source database. Often these are used to build business applications. There arises the need to connect both of these technologies. But for a newbie like me it is quite a daunting task to make them talk to each other. So, I am putting forward a tutorial showing how to accomplish the task.

I am assuming that the reader have installed both Java and MySQL.

Java Data Types

Data types specify the size and type of values that can be stored. The variety of data types available allow the programmer to select the type appropriate to the needs of the application. Data type in Java can be classified as:

  1. Primitive types
  2. Reference types

Java has 8 primitive types: -

boolean
char
double
float
byte
int
short
long

Also Java has 3 reference types:
Class
Arrays
Interfaces

Java Keywords

There are currently 50 reserved keywords defined in the Java programming language. These keywords are special words that are of importance to the Java compiler. Due to this reason these keywords cannot be used as names of variables, class, method or identifier. Even though const and goto are reserved keyword in Java yet these are not used.

abstract

Syndicate content