Add office photos
Engaged Employer

MindGate Solutions

3.2
based on 254 Reviews
Filter interviews by

Interview Questions and Answers

Updated 2 Jul 2024
Popular Designations

Q1. What are 4 pillors of oops concept? And explain them with example.

Ans.

The 4 pillars of OOP are Abstraction, Encapsulation, Inheritance, and Polymorphism.

  • Abstraction: Hiding implementation details and showing only necessary information. Example: A car dashboard only shows necessary information like speed, fuel level, etc.

  • Encapsulation: Binding data and methods that manipulate the data together. Example: A bank account class with methods to deposit, withdraw, and check balance.

  • Inheritance: Creating new classes from existing ones, inheriting their...read more

View 1 answer

Q2. What is difference between array and collection?

Ans.

Arrays are fixed in size and can store elements of the same type, while collections are dynamic and can store elements of different types.

  • Arrays have a fixed length, while collections can grow or shrink dynamically.

  • Arrays can only store elements of the same type, while collections can store elements of different types.

  • Arrays use indexed access for retrieval and modification, while collections provide various methods for manipulation.

  • Arrays are part of the core Java language, ...read more

View 1 answer

Q3. Is string mutable or immutable? And why?

Ans.

String is immutable because its value cannot be changed once it is created.

  • String objects are stored in the String pool, which is a part of the heap memory.

  • When a string is modified, a new string object is created with the modified value.

  • Immutable strings are thread-safe and can be safely shared among multiple threads.

  • String immutability allows for efficient memory utilization and optimization.

View 1 answer

Q4. What is multi threading?

Ans.

Multi threading is the concurrent execution of multiple threads in a single program.

  • Allows multiple tasks to run concurrently

  • Improves performance and responsiveness

  • Enables efficient utilization of CPU resources

  • Can be used for parallel processing

  • Examples: running multiple calculations simultaneously, handling multiple client requests

View 1 answer
Discover null interview dos and don'ts from real experiences

Q5. Steps for jdbc to connect database.

Ans.

JDBC steps to connect to a database

  • Load the JDBC driver class

  • Establish a connection to the database using the DriverManager class

  • Create a statement object to execute SQL queries

  • Execute the SQL queries and retrieve the results

  • Close the statement and connection objects

View 1 answer

Q6. Difference between collection and map.

Ans.

Collection is a group of objects while Map is a key-value pair data structure.

  • Collection is used to store and manipulate a group of objects.

  • Map is used to store and retrieve data based on key-value pairs.

  • Collection classes include List, Set, and Queue.

  • Map classes include HashMap, TreeMap, and LinkedHashMap.

  • Collections allow duplicate elements while Maps do not.

  • Example: Collection - List of names, Map - Student ID and corresponding name.

View 1 answer

Q7. Life cycle of thread.

Ans.

The life cycle of a thread refers to its various states and transitions during its execution.

  • A thread starts in the new state when it is created.

  • It moves to the runnable state when it is ready to run but waiting for the CPU.

  • When the CPU starts executing the thread, it enters the running state.

  • A thread can temporarily move to the blocked or waiting state when it is waiting for a resource or signal.

  • A thread can be terminated and move to the dead state when it completes its exec...read more

View 1 answer

Q8. Oops concept in Java program

Ans.

Oops concept in Java program refers to Object-Oriented Programming principles like inheritance, encapsulation, polymorphism, and abstraction.

  • Inheritance allows a class to inherit properties and behavior from another class.

  • Encapsulation hides the internal state of an object and only exposes necessary methods to interact with it.

  • Polymorphism allows objects of different classes to be treated as objects of a common superclass.

  • Abstraction focuses on the essential characteristics o...read more

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter