Please see the following code class sample { public static void main(String args[]) { int b = OxFF; } } Why am I getting this error.OxFF is a valid hexadecimal literal right?? sample.java:6: Undefined variable: OxFF int b = OxFF; ^ 1 error
Paul A
Ranch Hand
Joined: Aug 25, 2000
Posts: 44
posted
0
You have typed OxFF ( the letter 'O' ) instead of 0xFF (zero). So the compiler thinks that it is some variable and tries to look up this varible in it's table but does not find it. So it says undefined variable! HTH, Paul. ------------------ http://pages.about.com/jqplus Get Certified, Guaranteed!