I have two questions. 1 should I use chinese language in here? because my english is very poor. 2 This code can be completed,but there is a problem in runtime. I usualy ues Eclipse.This code's result in Eclipse is different than in commad(DOS,javac.exe) In Eclipse ,the result is always whole number In DOS,the result is always "radom" number Who can tell me why is differenc.
1). This is an English website, so foreign language posts are removed. besides, I think your english is fine.
2). My guess would be that in DOS your classpath is different than what is in Eclipse. Do you have different versions of Java's SDK on your machine. One could be pointing to one version, while the other to the other version.