Without using spring
First spring config and injection
Setting initial property of an object.
Injecting with constructor, multiple constructors, spring automatically converts the type. If multiple constructors with different types are present, you can define property type to help Spring which constructor to use. You can also specify the index of the prameter.
Injection an object as property with its own properties.
The use of inner beans (cannot be used for other objects), aliases and idref.