#interviewPreparation

Spring

41. Differentiate between WebClient and WebTestClient?The difference between the Web client and Webtestclient can be stated as follows. Web client Webtestclient Web client acts as a reactive client who performs non-blocking HTTP requests.  Webtestclient also acts as a reactive client that can be used in tests. It can handle reactive streams with backpressure. It can […]

Spring Read More »

Spring

31. What is Advice in Spring and explain its types?Any action taken by an aspect at some particular joinpoint in Spring Framework is called an Advice. Spring AOP makes use of advice for maintaining a chain of interceptors “around” the joinpoint i.e. as an interceptor. Advice can be of the following types: 32. What is

Spring Read More »

Spring

21. What is Annotation based Container configuration? How can we turn on annotation wiring in Spring framework?Annotation-based container configuration is an alternative to XML setups. Rather than using XML for describing a bean wiring, the developer moves the configuration to the component class by using annotations on the appropriate class, field, or method declaration.Because annotation

Spring Read More »

Spring

11. What are the benefits of STS?We can install plugins into Eclipse to get all the features of Spring Tool Suite. However, STS comes with Eclipse with some other important kinds of stuff such as Maven support, Templates for creating different types of Spring projects, and tc server for better performance with Spring applications. 12.

Spring Read More »

Spring

1. What is Spring Framework? Spring is one of the most widely used Java EE frameworks. Spring framework core concepts are “Dependency Injection” and “Aspect-Oriented Programming”.Spring framework can be used in normal java applications also to achieve loose coupling between different components by implementing dependency injection. We can perform cross-cutting tasks such as logging and

Spring Read More »

Collection

51 What is a weak HashMap?An implementation of the map interface, which includes only weak references to the keys. This allows garbage collection when the key is no longer referenced outside of the Map. 52. Why concurrentHashMap is not used over HashMap?This is because it doesn’t perform well in a multithreaded environment. 53. How to

Collection Read More »

Collection

11. Difference between Set and List?List is an ordered collection of elements and hence it maintains insertion order of elements while Set doesn’t maintain any ordering of the elements. List allows duplicate elements while Set doesn’t allow any elements. List is index-based, i.e.we can access elements in List based on Index, whereas we can’t access

Collection Read More »

Collection

1. What is java Collection framework and mention some benefits of it.Java 1.2 came up with Collections Framework that group all the collections interfaces, implementations and algorithms. Java Collections have come through a long way with the usage of Generics and Concurrent Collection classes for thread-safe operations. It also includes blocking interfaces and their implementations

Collection Read More »

Core Java

41. What is Static block in java?Static block in Java is mainly used to initialize the static data members. The specialty of the static block is that it is executed before the main method at the time of class loading.An example of the static block is as follows: 42. Can we execute a program without

Core Java Read More »

Core Java

31. What is operator precedence in java?Java provides a set of rules and regulations for particularly specifying the order in which operators are evaluated. If the expression has many numbers of operators then the operator precedence comes into action. This operator precedence evaluates the operators present in the expressions based on the priority. For example,

Core Java Read More »

Scroll to Top