NDS interview question

java core