Hexaware Technologies interview question

java concepts