Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Spring and the fly likes Spring with Generics Collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring with Generics Collection" Watch "Spring with Generics Collection" New topic

Spring with Generics Collection

deepak carter
Ranch Hand

Joined: Feb 19, 2011
Posts: 165
Hi All,

I have written a small program for list using spring framework.This is what i have written

Context file

two files are there for address setting

and my MAIN CLASS..

However its throwing an error

Can anyone help me in this regard
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17260

Yes, you are trying to add two Strings to a Collection that only takes Address objects. This would throw an exception in Java without Spring.


Why would you expect otherwise?


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Spring with Generics Collection