Incedo interview question

Java features and coding based on that