Java programs on basic data structures