QAD interview question

basic java programs