Programm to exercise SQL written in Java