eClerx interview question

Basic Intro, some java code, and logical question.