Trigent Software interview question

Core java program snd theory