QUOTE(IMU @ 24 Sep, 2008 - 09:50 PM)

same settings ..but my output is what i said
it is in the book java in 60 min a day..and i am working on the example.
based in my experience integer value has a corresponding value when w cast it in char
site this sample
CODE
int x = 65;
char y = (char) x;
char half = '\u00AB';
System.out.println("y is " + y + " and half is " + half);
CODE
y is A and half is ½
but if we change the value of x that we declare as an integer we notice that the value of y change
let see by this sample
CODE
int x = 66;
char y = (char) x;
char half = '\u00AB';
System.out.println("y is " + y + " and half is " + half);
now take a closer look on the on the result
CODE
y is B and half is ½
take a closer look at y is B;
before it is y is A;
This post has been edited by reyben_89: 6 Dec, 2008 - 11:41 PM