Profound Edutech
10+ UNO Minda Interview Questions and Answers
Q1. What is the use of inheritance? And types of inheritance in c++
Inheritance is a mechanism in C++ that allows a class to inherit properties of another class.
Inheritance helps in code reusability and saves time and effort in writing code.
Types of inheritance in C++ are single, multiple, multilevel, hierarchical, and hybrid.
Single inheritance is when a class inherits from only one base class.
Multiple inheritance is when a class inherits from more than one base class.
Multilevel inheritance is when a derived class inherits from a base class, ...read more
Q2. What is the use of virtual keyword in c++?
The virtual keyword in C++ is used to declare a virtual function, which can be overridden by a derived class.
Virtual functions allow for dynamic binding and polymorphism
They are used in inheritance to allow derived classes to provide their own implementation of a function
Virtual functions are called using a pointer or reference to the base class
The virtual keyword can also be used to declare a virtual destructor
Q3. Difference between method overriding and method overloading?
Method overriding is redefining a method in a subclass with the same name and signature as in the superclass. Method overloading is defining multiple methods with the same name but different parameters in the same class.
Method overriding is used to provide a specific implementation of a method that is already provided by its superclass.
Method overloading is used to define multiple methods with the same name but different parameters in the same class.
Method overriding is runti...read more
Q4. What is checked and unchecked exception?
Checked exceptions are checked at compile-time while unchecked exceptions are not.
Checked exceptions are those that are checked at compile-time and must be handled by the programmer using try-catch or throws clause.
Unchecked exceptions are those that are not checked at compile-time and can occur at runtime. They do not need to be handled explicitly.
Examples of checked exceptions include IOException, ClassNotFoundException, and SQLException.
Examples of unchecked exceptions inc...read more
Q5. Difference between abstract class and interface
Abstract class can have implementation while interface cannot. A class can implement multiple interfaces but only extend one abstract class.
Abstract class can have constructors while interface cannot
Abstract class can have non-abstract methods while interface can only have abstract methods
Interfaces are used to achieve multiple inheritance in Java
Abstract classes are used to provide a base for subclasses to extend and implement
Example of abstract class: Animal with abstract m...read more
Q6. What are principles of oops?
Principles of OOPs include encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation: bundling data and methods that operate on that data within a single unit.
Inheritance: creating new classes from existing ones, inheriting properties and methods.
Polymorphism: ability of objects to take on multiple forms, allowing for flexibility in programming.
Abstraction: hiding implementation details and only showing essential features to users.
Q7. What is functional interface?
A functional interface is an interface that contains only one abstract method.
Functional interfaces are used in Java 8's lambda expressions and method references.
They can also have default methods and static methods.
Examples of functional interfaces include Runnable, Comparator, and Callable.
Q8. What is an exception?
An exception is an event that interrupts the normal flow of a program's execution.
Exceptions are used to handle errors and unexpected situations in a program.
They can be caused by a variety of factors, such as invalid input, hardware failures, or network issues.
Examples of exceptions include NullPointerException, ArrayIndexOutOfBoundsException, and IOException.
Exception handling involves catching and handling exceptions in a way that allows the program to continue running.
If ...read more
Q9. What is map interface?
Map interface is a part of Java Collections Framework that maps unique keys to values.
It provides methods to add, remove, and retrieve elements based on their keys.
It does not allow duplicate keys.
It can be implemented by HashMap, TreeMap, and LinkedHashMap classes.
Example: Map
map = new HashMap<>(); map.put("John", 25);
int age = map.get("John"); // age = 25
Q10. What is interface?
An interface is a contract between two systems or components that defines the methods and properties that can be used to communicate with each other.
An interface defines a set of methods and properties that a class must implement.
Interfaces allow for polymorphism, where objects of different classes can be treated as if they are of the same type.
Interfaces can be used to define callbacks or event handlers.
Examples of interfaces in programming languages include Java's Runnable ...read more
Q11. Difference between ArrayList and vector
ArrayList is not synchronized while Vector is synchronized.
ArrayList is faster than Vector as it is not synchronized.
Vector is thread-safe while ArrayList is not.
Vector is a legacy class while ArrayList is not.
Vector can grow by a specified amount while ArrayList can grow by half of its size.
Example: ArrayList
list = new ArrayList<>(); Vector vector = new Vector<>(); Example: list.add(1); vector.add(1);
Example: list.remove(0); vector.remove(0);
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month