Tech Mahindra
Burns & McDonnell Interview Questions and Answers
Q1. What is inheritance and what is class and object
Inheritance is a concept in object-oriented programming where a class can inherit attributes and methods from another class. A class is a blueprint for creating objects, while an object is an instance of a class.
Inheritance allows a class to reuse code from another class, promoting code reusability and reducing redundancy.
A class is a template or blueprint for creating objects, defining attributes and methods.
An object is an instance of a class, representing a specific entity...read more
Q2. What is oops concepts in Java
Oops concepts in Java refer to Object-Oriented Programming principles like Inheritance, Encapsulation, Polymorphism, and Abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Polymorphism: Ability of a method to do different things based on the object it is acting upon.
Abstraction: Hiding the implementation details and showing only the necessary feature...read more
Q3. What is a collections in java
Collections in Java refer to classes and interfaces that implement data structures like lists, sets, and maps.
Collections provide a way to store and manipulate groups of objects in Java
Examples include ArrayList, LinkedList, HashSet, and HashMap
Collections framework includes interfaces like List, Set, Map, and classes like ArrayList, HashSet, and HashMap
Q4. What is list and set in java
List and Set are both interfaces in Java used to store collections of elements, but with different characteristics.
List is an ordered collection that allows duplicate elements, while Set is an unordered collection that does not allow duplicates.
List implementations include ArrayList, LinkedList, and Vector, while Set implementations include HashSet, TreeSet, and LinkedHashSet.
List allows access to elements by index, while Set does not guarantee any specific order of elements....read more
Q5. Write a program of prime numbers
Program to generate prime numbers
Create a function to check if a number is prime
Iterate through numbers and check for prime numbers
Store prime numbers in an array
Q6. Write. Program of palindrome program
A palindrome program checks if a given string reads the same forwards and backwards.
Create a function that takes a string as input
Remove any spaces and convert all characters to lowercase
Compare the string with its reverse to check if it is a palindrome
Top System Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month