java homework for collections & nio