Data Structures in java my way