Two Pointer Array Problems In Java