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

Показать описание
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?
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?
Комментарии