This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Originally posted by Konda Golamaru: ...My doubt is when i print ba[ch] at#3 it should take as ba[null]. Not sure how it is taking the index value for ch is 0 ...
A Java char is really a numeric value that corresponds to a character symbol (see ASCII table). The "null char" has a numeric value of zero. A Java int can obviously have a zero value, but it does not have a "null" value.
An array index is an int. So in the expression ba[ch], ch is converted to type int with a numeric value of zero. [ June 09, 2007: Message edited by: marc weber ]
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org