Posts

Showing posts from July, 2024

2. Random Interview Question

  Object Class Methods (total are 11 Methods) 1. toString() method 2. hashCode() method 3. equals(Object obj) method 4. finalize() method 5. getClass() method 6. clone() method 7. wait(),  8. notify()  9. notifyAll() methods What is Difference between @Componet and @Bean ? - both Indicate Object creation. - but if we have source code we can open the class on the top of class we can write at @Component if class is programmer define means we created the class then we can use it @Component .  - If class is predefined and if we want create object inside container then at that time we have to use @Bean(Java Based Configuration)  annotation along with @Configuration (Java Based Configuration).   Use of @Required Annotation ? - @Required annotation is applied to bean property setter methods. - @Required is an annotation that indicates that a bean property must be populated at configuration time. It ensures that a required dependency is injected before the bean is used. - Note that @Requ