-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Felix,
Felix Schumacher wrote: > Am Montag, den 21.05.2007, 13:54 +0800 schrieb Peter: >> hi all, >> >> I have come into a very wired problem. >> >> here it is. >> my project using JBuilder 2006 and tomcat 5.5.20. >> when i put a 0 into a list and get 1 as a result. >> simple code for testing! >> >> List alist =new ArrayList(); >> alist.add(0); put 0 into it >> alist.get(0); get 1 as result. > Have you tried to put an Object into ArrayList? > Like > alist.add(Integer.valueOf(0)); > System.out.println((Integer)alist.get(0)); > > I don't think it is possible to store an int into an ArrayList. Generics + autoboxing ought to allow you to put ints into an ArrayList (at least syntactically, though it's really just syntactic sugar). - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGUhdv9CaO5/Lv0PARAmKMAJ9DjxpSf4zZmIdM+WQx8+q0fSRf7ACgjTAl MBXxUu/ld4Aanpt9gQ8IXGg= =38QU -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]