Java Basics Demo code