Java Experiment in Class