Amdocs interview question

Java basics