Girmiti Software
BigBasket Interview Questions and Answers
Q1. difference between checked exception and unchecked exception?
Checked exceptions are checked at compile-time, while unchecked exceptions are not.
Checked exceptions are declared in the method signature or caught using try-catch blocks.
Unchecked exceptions do not need to be declared or caught explicitly.
Checked exceptions are typically used for recoverable errors, while unchecked exceptions are used for unrecoverable errors.
Examples of checked exceptions include IOException and SQLException.
Examples of unchecked exceptions include NullPoi...read more
Q2. difference between method overloading and overriding?
Method overloading is having multiple methods with the same name but different parameters. Method overriding is having a method in a subclass with the same name and parameters as in the superclass.
Method overloading is compile-time polymorphism while method overriding is runtime polymorphism.
Method overloading is used to provide different ways of calling the same method with different parameters.
Method overriding is used to provide a specific implementation of a method that i...read more
Q3. how to create a object?
To create an object, define a class and instantiate it using the 'new' keyword.
Define a class with properties and methods
Instantiate the class using the 'new' keyword
Access the object's properties and methods using dot notation
Q4. what is inheritance?
Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.
Inheritance allows code reuse and promotes code organization.
The existing class is called the parent or superclass, and the new class is called the child or subclass.
The child class inherits all the properties and methods of the parent class, and can also add new properties and methods.
For example, a class Animal can be a parent class, and class...read more
Q5. difference between throw and throws?
throw is used to explicitly throw an exception in a method, while throws is used to declare the exceptions that a method may throw.
throw is used within a method to throw an exception when a certain condition is met
throws is used in the method signature to declare the exceptions that may be thrown by the method
throw is followed by an exception object, while throws is followed by the exception class names separated by commas
Example: throw new IllegalArgumentException("Invalid i...read more
Q6. what is collection?
A collection is a group of related objects or data items that can be accessed and manipulated in a unified way.
Collections are used to store and organize data in a program.
They can be of various types such as arrays, lists, sets, maps, etc.
Collections provide methods to add, remove, and access elements.
Examples include ArrayList, HashSet, TreeMap, etc.
Q7. what is interface?
An interface is a contract that specifies the methods and properties that a class must implement.
An interface defines a set of methods and properties that a class must implement
Interfaces are used to achieve abstraction and polymorphism
Interfaces can be used to define contracts between different parts of a system
A class can implement multiple interfaces
Interfaces are declared using the 'interface' keyword in most programming languages
Q8. brief explain oops concept?
OOPs is a programming paradigm based on the concept of objects that interact with each other.
OOPs stands for Object-Oriented Programming.
It focuses on creating objects that have properties and methods.
Encapsulation, Inheritance, and Polymorphism are the three main pillars of OOPs.
Encapsulation is the process of hiding the internal details of an object from the outside world.
Inheritance allows a class to inherit properties and methods from another class.
Polymorphism allows obj...read more
Q9. OOps in java Multithreading
Object-oriented programming in Java allows for creating classes and objects to model real-world entities. Multithreading enables concurrent execution of multiple threads within a single process.
Java supports OOP concepts like inheritance, encapsulation, polymorphism, and abstraction.
Multithreading in Java allows multiple threads to run concurrently, improving performance and responsiveness.
Example: Creating a new thread in Java - Thread thread = new Thread(() -> { // thread l...read more
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month