Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 40625 invoked from network); 7 Dec 2004 16:12:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 7 Dec 2004 16:12:14 -0000 Received: (qmail 8215 invoked by uid 500); 7 Dec 2004 16:10:48 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 8176 invoked by uid 500); 7 Dec 2004 16:10:48 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 8131 invoked by uid 99); 7 Dec 2004 16:10:47 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of parsonstechnical@earthlink.net designates 207.217.121.183 as permitted sender) Received: from pop-a065c05.pas.sa.earthlink.net (HELO pop-a065c05.pas.sa.earthlink.net) (207.217.121.183) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 07 Dec 2004 08:10:46 -0800 Received: from va-69-34-33-6.sta.sprint-hsd.net ([69.34.33.6] helo=ptslaptop) by pop-a065c05.pas.sa.earthlink.net with smtp (Exim 3.33 #1) id 1CbhvI-0000Lq-00 for tomcat-user@jakarta.apache.org; Tue, 07 Dec 2004 08:10:44 -0800 Message-ID: <019101c4dc77$4bed5340$8101a8c0@ptslaptop> From: "Parsons Technical Services" To: "Tomcat Users List" References: <003201c4dc72$35da2dd0$76a7a8c0@nils> <1cdafd0b041207074262191f68@mail.gmail.com> <00d901c4dc74$951c8d90$76a7a8c0@nils> Subject: Re: off topic - how do i convert an int to char Date: Tue, 7 Dec 2004 11:10:39 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Cast it with the offset added. int i = 0; char ch = (char)(i+97); Wrap in a try catch block if desired. Doug ----- Original Message ----- From: "Nilesh Bhattad" To: "Tomcat Users List" ; "Yang Xiao" Sent: Tuesday, December 07, 2004 10:51 AM Subject: Re: off topic - how do i convert an int to char > That would be the last solution if i dont get any other better way of > doing it... i tried with Character.forDigit(97, 2) hoping to get 'a' back > but it returned 0... i'm not sure which radix does it expect as a 2nd > argument. > > btw Yang, thanks for quick response. > > - nilesh > > ----- Original Message ----- > From: "Yang Xiao" > To: "Tomcat Users List" > Sent: Tuesday, December 07, 2004 10:42 AM > Subject: Re: off topic - how do i convert an int to char > > >> make a hash or array? >> >> >> On Tue, 7 Dec 2004 10:34:15 -0500, Nilesh Bhattad >> wrote: >>> folks, >>> sorry for posting this offtopic qns here.. but would someone plz help me >>> out in converting an int value to char? my requirement is very simple. >>> i'm looping thro a list and for each counter i need to get 'a', 'b' and >>> so forth. >>> >>> basically i need some conversion routine which will convert 0 to 'a', 1 >>> to 'b', 2 to 'c' and so on. >>> >>> again, i apologize for posting such a dumb qns. >>> >>> - nilesh >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org >> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org >> >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org