Data Structures Lab2 (Java)