Most Asked Java, Spring Boot, M's Interview question for 5+ years experienced in 2023 | Code Decode

Описание к видео Most Asked Java, Spring Boot, M's Interview question for 5+ years experienced in 2023 | Code Decode

In this video of code decode for 5+ years experienced most asked java spring boot microservice hibernate interview questions for 5 years in 2023

Udemy Course link : https://www.udemy.com/course/master-s...

Can we use HashMap in a multi-threaded environment?
You can use the HashMap for query services (in CQRS Microservices Design pattern ) but the probability of working fine depends on the way we use it. For instance, consider the HashMap of configuration properties, if the HashMap initialization / modification was done by using just one thread, and the remaining threads do the task of reading from the map, then HashMap would work perfectly well.

The problem arises when there is concurrent update on Hash Map. Hence, during such scenarios, we can use the HashTable or ConcurrentHashMap

Is there any difference in defining or creating a String by using String literal and by using the new() operator?
Creating string using the new operator ensures that the String is created in the heap and into the string pool both.

Whereas, creating string using literal ensures that the string is created in the string pool.

String pool exists as part of the heap.

This ensures that the multiple Strings created using literal having same values are pointed to one object and prevents duplicate objects with the same value from being created

What do you know about Factory Design Pattern in Java?
Factory design pattern is the most commonly used pattern in Java.

They belong to Creational Patterns because it provides means of creating an object of different instances.


What are the Spring Boot Starters?
Spring Boot Starters are a set of pre-configured dependencies that can be easily included in your project to quickly get started with common features or technologies.



Spring boot starter is a maven template that contains a collection of all the relevant transitive dependencies that are needed to start a particular functionality.

Like we need to import spring-boot-starter-web dependency for creating a web application.



What is Spring Boot Actuator?
Spring Boot Actuator is a set of features that provide monitoring and management capabilities for your Spring Boot application.

Actuator endpoints expose information about your application, such as health status, metrics, and environment variables, that can be used to monitor and manage your application.



The profile names can also be passed in via a JVM system parameter. These profiles will be activated during application startup:
-Dspring.profiles.active=dev


Whats AOP
Aspect Oriented Programming (AOP) is a programming paradigm aiming to segregate cross-cutting functionalities, such as logging, from business logic in an application

Aspect - Aspect is a class in which we define Pointcuts and Advices.

Advice - It’s the behavior that addresses system-wide concerns (logging, security checks, etc…). This behavior is represented by a method to be executed at a JoinPoint. This behavior can be executed Before, After, or Around the JoinPoint according to the Advice type as we will see later.

Pointcut - A Pointcut is an expression that defines at what JoinPoints a given Advice should be applied.

JoinPoint - Simply put, a JoinPoint is a point in the execution flow of a method where an Aspect (new behavior) can be plugged in.


How can you access a value defined in the application? What is properties file in Spring Boot?
Use the @Value annotation to access the properties which is defined in the application – properties file.




Swagger 2 is an open-source service provided in Spring Boot which makes it easier for the machines to find out the structure of APIs like RESTful Web services.


Most Asked Core Java Interview Questions and Answers:    • Core Java frequently asked Interview ...  
Advance Java Interview Questions and Answers:    • Advance Java Interview Questions  

Java 8 Interview Questions and Answers:    • Java 8 Interview Questions(New Features)  

Hibernate Interview Questions and Answers:
   • Hibernate Interview Questions Java  

Spring Boot Interview Questions and Answers:
   • Advance Java Interview Questions  

Angular Playlist:    • Angular Course Introduction || Angular 8  
SQL Playlist:    • SQL Interview Questions and Answers  

GIT:    • GIT  

Subscriber and Follow Code Decode
Subscriber Code Decode: https://www.youtube.com/c/CodeDecode?...
LinkedIn:   / codedecodeyoutube  
Instagram:   / codedecode25  

#java #interviewquestions #codedecode

Комментарии

Информация по комментариям в разработке