Mohammed Sardar. wrote:I think my doubt is related to this post and it's rolling in my mind for a long. Does Autowire feature provide all the features as like if extend a class ?
To elaborate, if we Autowire a class in another class using @Autowired annotation then creation of object as a bean will be taken care by Spring container. And we can reuse all of its fields and attributes ? Is there any limitation to Autowire and extends Keyword ? Then does Autowire came into scene as a reusable feature? It's known that Autowiring is not to encourage tightly coupled beans. Is my Question logic ? Why my brain thinks Autowire as an Reusability feature ? Please help me with your comments. Thanks
No, autowiring is not like extends. Autowiring is about "has-a" and extends is about "is-a", the concepts that you studied while preparing for
OCAJP