Capgemini Java Interview Questions & Answers | Must-Know for Experienced Candidates! | Code Decode

preview_player
Показать описание
Experienced Java Developer Interview for Capegemini. In this video of code decode we have Capegemini Java Interview for experienced developer

Udemy Course of Code Decode on Microservice k8s AWS CICD link:

Course Description Video :

The first Java Questions asked in Capegemini Interview was
Describe, in general, how java's garbage collector works ?
The Java runtime environment deletes objects when it determines that they are no longer being used. This process is known as garbage collection.

JVM has the code written for Garbage collection that periodically frees the memory used by objects that are no longer needed. It is an automatic process. The programmer does not need to explicitly mark objects to be deleted.

The Java garbage collector is a generational mark-sweep garbage collector which involves three phases:

Mark - Mark objects as alive

Sweep - phase releases the memory fragments with dead (unmarked) objects.

The next Java Questions asked in Capegemini Interview was
What is an immutable class ?
Immutable class means once the object of the class is created its fields cannot be modified or changed. In Java, all the wrapper classes like Boolean, Short, Integer, Long, Float, Double, Byte, Char, and String classes are immutable classes.

The object’s hash code can easily be cached.
These objects are a good choice for keys for Maps.
These objects are good for a multi-threaded environment as the object's state won’t change.
An immutable object’s state won’t change, so the same object can be used at multiple places and hence saving the memory.

The next Java Questions asked in Capegemini Interview was
Difference between load and get ?
load() will throw an exception(ObjectNotFound) if an object with id passed to them is not found, but get() will return null.

load can return proxy(a blank dependent) without hitting the database unless required (when you access any attribute other than id) but get() always go to the database, so sometimes using load() can be faster than the get() method.

Use the load() method, if you know the object exists, and get() method if you are not sure about the object's existence.

The next Java Questions asked in Capegemini Interview was
What are the ways to break singleton pattern ?
Through Reflection.

If multiple class loaders are loading the class.

If the class is serializable or cloneable.

If we don't have double checked locking, it can be broken easily through multi threaded access.

Hibernate Interview Questions and Answers:
Spring Boot Interview Questions and Answers:

Subscriber and Follow Code Decode

#capegeminiInterview #JavaInterviewQuestions #codedecode

0:00 Introduction
0:29 Describe, in general, how java's garbage collector works?
2:59 What are the methods of Object Class?
5:09 Which access specifiers can be used with top level class?
5:30 What is an immutable class?
6:38 How to create an immutable class?
7:52 Difference between load and get?
8:59 What is Criteria in Hibernate?
9:43 What are the ways to break singleton pattern?
13:05 Explain Hibernate caching mechanism
14:10 How one dao Implementation object (singleton) can handle multiple requests?
15:48 Given 2 tables how will you join them in object oriented manner?
16:17 What type of mappings are allowed in hibernate/JPA?
Рекомендации по теме
Комментарии
Автор

omg! I I work here.! I keep taking interviews for entry/associate level java roles but some suimilar questions were actually asked. Maybe beacuase of compatitive job market thesedays. Always Thank you. I just saw you have linked your insta and linkedIn.! I will follow now~!

sproutboot
Автор

Tq so much madam, ur vedeos are so helpful for preparation .Keep more posting on collections madam,

rachamallidorasrivignesh
Автор

Please add more interview questions on spring and spring boot

akashsaha
Автор

please attach slides to description section for later revision

rakeshsonti
Автор

Excellent video mam 👍, mam can you please make videos with practical implimentation on deepclone immutable classes and about criteria and criteria builder that how we can create and write query with that 🙏🏻🙏🏻

utkarshshukla
Автор

Gm Madam
I am bit confused that objects in String constant pool can be destroyed by garbage collector or not??

As you say garbage collector don't have rights to destroy string constant pool non reference objects ???

Please reply mam

dhirajbindal
Автор

Thank you soo much Ma'am can you please do video on @sheduled annotation as well

BalaGuravaiahParimi
Автор

I wonder, do you ever need to know how garbage collector works apart being used in the interviews?

fidanras
Автор

Hi...i have same doubts...for coding practices should I need to follow leetcode side ...like my concern is from where we will get actual practical coding question...i am going through leetcode.finding it quite difficult to understand ..please guide

pratibhanikam
Автор

Hii ...mam you are running any institute? So that I can join in that

shasha