Tech Mahindra interview question

Nothing difficult . All the Java Basics