Narvar interview question

Java fundamentals