Java class and object programming example