Suppose we have a Pojo class MyPojo , which want to access an object from Spring Bean , How can we do that ?
A Simple Approach would be to use ApplicationContextAware Interface of Spring , We can implement this class to return Bean of…
A recent Vaadin study on the state of Java in the enterprise notes that Java is undergoing a…
@Bean vs @Component In Spring Boot
We use Final keyword in three context in Java :-
What are Immutable Classes ?
public class Immutable { int x; String y; }
As we can see in this class , we have two fields , Once we initialized the object of this class , both of these fields will have a state
We have wonder many a time , how a single spring bean can serve so many concurrent request without corrupting data of Individual Requests .
In Java equals() method is used to compare equality of two Objects. The equality can be compared in two ways:
Shallow comparison: The default implementation of equals method is defined in Java.lang.Object class which simply checks if two Object references (say x…
Often we think why java has the hashcode method associated with it in the Object Class , where do we use it as developers and why we need to overwrite it when we are overriding the equals method ?