Beginner's question
Hi,
I'm new to java and I'm making some little things with it, but with
some test I get weird results. Look this example:
package variables;
public class Test {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println((char)164);
System.out.println((char)241);
System.out.println((int)'=A4');
System.out.println((int)'=F1');
}
}
When I run this code in Eclipse (Shift+Alt+X, J) I get this (wrong)
results:
=A4
=F1
164
241
Then I copied to UEdit32, save it as Test.java, compiled using javac
Test.java and run with java Test and get this (right) results:
C:\tools>java Test
=F1
=B1
164
241
C:\tools>
My system is Windows XP sp 2 spanish version with java version
"1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
Eclipse SDK
Version: 3.2.0
Build id: M20060629-1905
MyEclipse Web Services Support
Version: 5.0.1
Build id: 20060810-5.0.1-GA
I'm trying to make a module for an existing application and I'm afraid
this can happen on production and things get messy.
What do you think can be causing this? How can I solve it?
Thanks in advance,
Jorge