Marlabs interview question

Something about Java basics