Verizon interview question

java coding in as per jd