Coding the basic data structures for practice in java