Reading and Writing files in Java

Reading a File:

/*
* FileInputDemo
* Demonstrates FileInputStream and
* DataInputStream
*/

import java.io.DataInputStream;
import java.io.FileInputStream;
public class FileInputDemo { public static void main(String args[]) {
// args.length is equivalent to argc in C
  if (args.length == 1) {       try {
         // Open the file that is the first
         // command line parameter

         FileInputStream fstream = new FileInputStream(args[0]);
         // Convert our input [...]

Connect MySQL From Java (JDBC)

Download MySQL Server: 
The main download page for both the database server and the connector as of September 2004 is http://dev.mysql.com/downloads/. 
Several different versions of the database server are available for downloading:
MySQL 5.0 — Generally Available (GA) release for production use
Upcoming Releases:
MySQL 5.1 — Release Candidate release, Test new features early!
MySQL 6.0 — Alpha – Falcon Preview [...]