Qualcomm interview question

Very specific Java questions.