samy mity wrote:Is spring bean can be considered as object ? As here all properties of class is injected with data.
While it is technically very true what Stephan said, read some other opinion stated by Uncle Bob in his Clean Code book. Some summary you can find in his blog.
He calls such objects as data structures, as there are in most cases 2 types of methods: getters and setters - these either return or set objects state.
There isn't really a way to hide methods implementation internals in the sense of author's words, as all what those methods do - just return the fields.
From technical perspective these are objects, but from OO perspective, more of a data structure which holds the data and don't do any calculations on it.
I'm sorry if I confused you. That wasn't my intention. Read that blog and if you have a chance the book too, I really liked it, so you could see author's thoughts in the wider context. There are people who agree and who don't
I find that very confusing and a level of academic hair-splitting that does not serve anyone, especially newcomers.
Beans are objects. Period. Whether they are used for special purposes or not without using all of the capabilities of objects is irrelevant. You might as well say that servlets aren't objects because they are specialized and don't use all of the capabilities available to objects.