Barry van Oudtshoorn you are right , I am not very clear with how Java handles the packages . I will give a quick look into the link that you have given . If I still face problems I will get back . I thank you Barry for making aware of where I going wrong , As I was using Netbeans previously I really didn't have to care about Compilation and Execution ,all that has to be done was to write the code .