Navionics interview question

Core java concepts