java array programs for interview 2024