samples that can execute a main method of java