MENU

Fun & Interesting

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

Code Decode 103,441 2 years ago
Video Not Working? Fix It Now

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-spring-boot-microservice-angular-with-k8s-cicd-aws/?referralCode=3E862DBAE6E1B1329893 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: https://youtube.com/playlist?list=PLyHJZXNdCXscoyL5XEZoHHZ86_6h3GWE1 Advance Java Interview Questions and Answers: https://youtube.com/playlist?list=PLyHJZXNdCXsexOO1VQ4vs-BM2-8CKrixd Java 8 Interview Questions and Answers: https://youtube.com/playlist?list=PLyHJZXNdCXsdeusn4OM33415DCMQ6sUKy Hibernate Interview Questions and Answers: https://youtube.com/playlist?list=PLyHJZXNdCXsdC-p2186C6NO4FpadnCC_q Spring Boot Interview Questions and Answers: https://youtube.com/playlist?list=PLyHJZXNdCXsexOO1VQ4vs-BM2-8CKrixd Angular Playlist: https://www.youtube.com/watch?v=CAl7RQSdq2Q&list=PLyHJZXNdCXsfxRtDwtGkDD_lLfTWc1g0i SQL Playlist: https://www.youtube.com/playlist?list=PLyHJZXNdCXse86eLuwy5uZohd_bddE9Ni GIT: https://youtube.com/playlist?list=PLyHJZXNdCXscpl6pxOnL2lRWJlzvzjyZE Subscriber and Follow Code Decode Subscriber Code Decode: https://www.youtube.com/c/CodeDecode?sub_confirmation=1 LinkedIn: https://www.linkedin.com/in/codedecodeyoutube/ Instagram: https://www.instagram.com/codedecode25/ #java #interviewquestions #codedecode

Comment