Saimple Java data structures and logic codes