tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Short" <dsh...@san.rr.com>
Subject RE: hi,wired problem? add 0 into alist but get 1 as a result!
Date Mon, 21 May 2007 16:20:24 GMT
Try creating your List like this and see what happens.

List<int> alist =new ArrayList<int>(); 

-----Original Message-----
From: Peter [mailto:litongjie@gmail.com] 
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 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 <delbd+jakarta@oma.be> wrote:
>
> 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 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 using JBuilder2006 to complie it and run under 
> > tomcat 5.5.20.
> > i choose Jbuilder 2006 builder property: language features ( java 2 
> > SDK V5.0generic enable) ; target VM java 2 SDK V5.0 and later
> >
> > but if i choose target VM target VM java 2 SDK V1.4 and later it 
> > works fine, put 0 get 0.
> > and if i donot run under the tomcat it still fine
> >
> > so i create another small project, in a jsp only doing List alist 
> > =new ArrayList(); alist.add(0); alist.get(0); and it works fine as 
> > well under the same tomcat.
> >
> >
> > i wonder what happens here?
> > my project using many other jar file , i wonder if there is 
> > something wrong there.
> > does anyone has a idea?
> >
> > thanks in advanced!
> >
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
> e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message