Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-22 Thread David Delbecq
En l'instant précis du 22/05/07 05:21, Peter s'exprimait en ces termes: hi all; only get problem when put 0 into the list, put 1 or any number is ok, put new Integer(0) is ok as well; Ide not recompiling or tomcat not reloading class, while you think you are running the 0 case, you are in fact

RE: Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-22 Thread David Short
Do a clean and build in your IDE. Run the test case in the IDE if possible. -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 22, 2007 2:35 AM To: Tomcat Users List Subject: [Norton AntiSpam] Re: hi,wired problem? add 0 into alist but get 1 as a

Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread Leon Rosenberg
On 5/21/07, Peter [EMAIL PROTECTED] wrote: 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

Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread David Delbecq
Never heard of such problem. Check your code. Either you add 1 to list, not 0, either you badly display result, either it's not the same list. Peter a écrit : 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

Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread Peter
hi all i put it in the jsp, and here is the code generate by tomcat i did not see if there is any wrong there. package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import java.util.*; public final class jsp1_jsp extends

Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread Peter
in the mail before, i put 0 in a list and get 1 as result. On 5/21/07, Leon Rosenberg [EMAIL PROTECTED] wrote: On 5/21/07, Peter [EMAIL PROTECTED] wrote: 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

Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread Peter
thanks i am sure that i put 0 in to a list and i am not badly display result and it is the same list and it is only occur in this project. thanks for any idea On 5/21/07, David Delbecq [EMAIL PROTECTED] wrote: Never heard of such problem. Check your code. Either you add 1 to list, not 0,

Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread Peter
hi all i try to do like List alist =new ArrayList(); alist.add(0L); alist.get(0); and it is fine. donot know why? On 5/21/07, Peter [EMAIL PROTECTED] wrote: 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

RE: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread David Short
Try creating your List like this and see what happens. Listint alist =new ArrayListint(); -Original Message- From: Peter [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 2:29 AM To: Tomcat Users List Subject: Re: hi,wired problem? add 0 into alist but get 1 as a result! thanks i

Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread Felix Schumacher
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);

RE: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread David Short
Try creating your List like this and see what happens. Listint alist =new ArrayListint(); -Original Message- From: Peter [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 2:29 AM To: Tomcat Users List Subject: Re: hi,wired problem? add 0 into alist but get 1 as a result! thanks i

Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread Leon Rosenberg
On 5/21/07, David Short [EMAIL PROTECTED] wrote: Try creating your List like this and see what happens. Listint alist =new ArrayListint(); and you get this compiled? -Original Message- From: Peter [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 2:29 AM To: Tomcat Users List

Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread Leon Rosenberg
On 5/21/07, Felix Schumacher [EMAIL PROTECTED] wrote: 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. Autoboxing is the magic word here. The compiler

Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread Pid
David Short wrote: Try creating your List like this and see what happens. Listint alist =new ArrayListint(); Won't work, you can't use primitives, instead do: ListInteger alist = new ArrayListInteger(); -Original Message- From: Peter [mailto:[EMAIL PROTECTED] Sent: Monday, May

RE: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread David Short
Yes. It declares that the List is going to hold integers. See http://www.onjava.com/lpt/a/6014. -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 1:10 PM To: Tomcat Users List Subject: Re: hi,wired problem? add 0 into alist but get 1 as a

Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread Christopher Schultz
-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

Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread Peter
hi all thanks for the reply; things getting a litter clear. when i remove the jar file 'antlr-2.7.5H3.jar' , it work fine, put 0 in and get 0 out. but when i put the jar file back, it still put 0 in and get 1 out. the jar is in the \tomcat\webapps\'myproject'\WEB-INF\lib\ it seems like the

Re: hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-21 Thread Peter
hi all; only get problem when put 0 into the list, put 1 or any number is ok, put new Integer(0) is ok as well; i think it may be a bug. does anyone has a idea? regards On 5/21/07, Peter [EMAIL PROTECTED] wrote: hi all, I have come into a very wired problem. here it is. my project using

hi,wired problem? add 0 into alist but get 1 as a result!

2007-05-20 Thread 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. it occurs when i