cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <u....@cbim.it>
Subject Re: How to synchronize combos...
Date Thu, 03 Oct 2002 12:32:23 GMT
Antonio Gallardo Rivera wrote:

>    if (i > 0)
>    {
>      a.concat("WHERE cat_id=");
>      a.concat(Integer.toString(i));
>    }

Strings in Java are immutable! The concat(String) method returns a *NEW* 
  String [1].

	a = a.concat("WHERE cat_id=");
	a = a.concat(Integer.toString(i));

Or better yet, use a StringBuffer.

	Ugo

-- 
Ugo Cei - http://www.beblogging.com/blog/


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message