View Single Post
  #4 (permalink)  
Old 04-30-2007, 11:37 PM
goldhouse goldhouse is offline
Senior Member
 
Join Date: Mar 2007
Posts: 136
goldhouse is on a distinguished road
I forgot the answer the question ,BTW In java the expressions are evaluated from left to right
hence first one will evaluated as character
and second one will be an int type. The ascii value of 'X' is 88

Say what will happen


System.out.println( 2 + 2 + "2") // print 4
System.out.println( "" +2 + 2 ) // print 22
Reply With Quote