Console Applications for Beginners

Here is a collection of Java programs for those who want to enter the world of Java programming. They serve as samples, showing how to use the J2SE API. They were written for only educational purposes, so can be downloaded to work on source codes. If you have questions, send me an e-mail .

My Encryptor

Encrypts a file with a simple method.
Classes: File, FileInputStream, FileOutputStream
download zip

My Grep

To search a regular expression in given files.A simple implementation
of 'grep' command in Unix operating system.
Classes: Pattern, Matcher, LineNumberReader, PrintWriter
download zip

My Number Server

A number guess game -client/server application, that consists of a server which produces a random number and waits for connections from clients. Telnet can be used to connect to the server. Several clients can connect at the same time.Useful to understand the client / server architecture, use of Threads to manage several clients and TCP/IP & sockets.
Classes: ServerSocket, Socket, Exception, Thread, BufferedReader InputStreamReader, OutputStreamWriter, BufferedWriter, PrintWriter, Integer.
download zip

Sample Codes

Connecting to MySql database via JDBC

Using a generic Map

Implementing a key event

Understanding Exceptions

A color box frame

Setting an icon image

Listing available fonts

Random number between (0-100]

Creating and showing a Window

Creating and showing a SplashScreen

Implementing threads