Tech Mahindra Interview Question

OOP Concepts: Encapsulation, Inheritance, Polymorphism, Abstraction. JVM, JRE, JDK: Understanding their roles and differences. Data Types and Variables: Primitive types, reference types, scope, and default values. Control Structures: if-else, switch, loops (for, while, do-while). Arrays and Collections: ArrayList, LinkedList, HashMap, HashSet, TreeSet, their differences, and use cases. String Handling: String, StringBuffer, StringBuilder, and their immutability. Exception Handling: try-catch-finally, custom exceptions, checked vs. unchecked exceptions.