G10 Consultancy interview question

Basics of java