Add office photos
Engaged Employer

Capgemini

3.8
based on 38.8k Reviews
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

10+ Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. What is Hash map in java

Ans.

Hash map is a data structure that stores key-value pairs and allows fast retrieval of values based on keys.

  • Hash map uses hashing to store and retrieve values based on keys

  • It allows null values and null keys

  • It is not synchronized and not thread-safe

  • Example: HashMap map = new HashMap<>();

  • map.put("apple", 1); int value = map.get("apple");

Add your answer

Q2. List all languages in Sql and explain

Ans.

List of SQL languages and their brief explanation

  • SQL (Structured Query Language) is a standard language for managing relational databases

  • T-SQL (Transact-SQL) is a proprietary extension of SQL used by Microsoft SQL Server

  • PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation's proprietary extension of SQL

  • MySQL is an open-source relational database management system that uses SQL

  • PostgreSQL is an open-source object-relational database management system that...read more

Add your answer

Q3. Super key and foreign key difference

Ans.

Super key is a set of attributes that uniquely identifies a record, while foreign key is a reference to a primary key in another table.

  • Super key is a combination of one or more attributes that uniquely identifies a record in a table.

  • Foreign key is a field in a table that refers to the primary key of another table.

  • Super key can have additional attributes that are not necessary for uniqueness.

  • Foreign key establishes a relationship between two tables.

  • Example: In a database of st...read more

View 1 answer

Q4. Memory management and hash map in java

Ans.

Memory management and hash map are important concepts in Java programming.

  • Memory management is the process of allocating and deallocating memory in a program.

  • Java uses automatic memory management through garbage collection.

  • Hash map is a data structure that stores key-value pairs and uses hashing to retrieve values efficiently.

  • Java's HashMap class implements the Map interface and provides constant-time performance for basic operations.

  • It is important to properly manage memory ...read more

Add your answer
Discover null interview dos and don'ts from real experiences

Q5. Primary key and candidate key difference

Ans.

Primary key uniquely identifies a record while candidate key can also uniquely identify a record but may not be chosen as primary key.

  • Primary key is a column or set of columns that uniquely identifies each record in a table

  • Candidate key is a column or set of columns that can also uniquely identify each record in a table

  • A table can have multiple candidate keys but only one primary key

  • Primary key cannot have null values while candidate key can have null values

  • Example: In a tabl...read more

Add your answer

Q6. List all languages in sql

Ans.

List of SQL languages

  • MySQL

  • Oracle

  • PostgreSQL

  • Microsoft SQL Server

  • SQLite

Add your answer

Q7. Exception handling in java

Ans.

Exception handling in Java allows for the handling of errors and exceptions that may occur during program execution.

  • Java provides try-catch blocks to handle exceptions.

  • The try block contains the code that may throw an exception.

  • The catch block catches and handles the thrown exception.

  • Multiple catch blocks can be used to handle different types of exceptions.

  • The finally block is optional and is executed regardless of whether an exception occurs or not.

  • Exceptions can also be thr...read more

View 1 answer

Q8. Memory management in java

Ans.

Memory management in Java involves automatic garbage collection and manual memory allocation.

  • Java uses automatic garbage collection to free up memory

  • Developers can manually allocate memory using the 'new' keyword

  • Java also has a 'finalize' method to clean up resources before garbage collection

  • Memory leaks can occur if objects are not properly released

Add your answer

Q9. Exceptional handling in java

Ans.

Exceptional handling in Java is a mechanism to handle runtime errors and prevent program crashes.

  • Java provides try-catch blocks to handle exceptions

  • Multiple catch blocks can be used to handle different types of exceptions

  • Finally block is used to execute code regardless of whether an exception is thrown or not

Add your answer

Q10. Oops concepts in java

Ans.

Oops concepts are fundamental to Java programming and include inheritance, polymorphism, encapsulation, and abstraction.

  • Inheritance allows a class to inherit properties and methods from a parent class.

  • Polymorphism allows objects to take on multiple forms and behave differently based on their context.

  • Encapsulation hides the implementation details of a class and only exposes necessary information.

  • Abstraction focuses on the essential features of an object and hides unnecessary d...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