From: Jakub Travnik Date: 2002-03-10T23:20:36+09:00 Subject: Re: Interesting link on static/dynamic typing... Frank Mitchell wrote: [snip] > One of the more annoying things about Java is that, whenever you put an > object into a collection class you have to typecast it to get it out ... > and if due to some bug the wrong type of object got in, good luck > finding where. Another annoyance is having to wrap an int or float in > an object to add it to a collection. IMHO correct OOP way is to have encapsulating class for that collection. That class would centralize access to collection so there would be exactly one typecast. Problem with this is that you will have to provide all necessary methods to access objects in collection. Jakub Travnik jabber://jtra@jabber.com