Topic: 请帮忙看一下哪里出错了(parseLong) |
Print this page |
1.请帮忙看一下哪里出错了(parseLong) | Copy to clipboard |
Posted by: binghuo007 Posted on: 2006-03-26 09:33 public class Test1 { long num=1; void testCount(String args[0]){ for(long i=1;i<=parseLong(args[0]);i++){ num=num*i; } } public static void main(String args[]){ System.out.println(new Test1().testCount((args[0]))); } } |
2.Re:请帮忙看一下哪里出错了 [Re: binghuo007] | Copy to clipboard |
Posted by: mliwng Posted on: 2006-03-26 13:32 public class Test1 { long num=1; void testCount(String args[0]){ for(long i=1;i<=Integer.parseLong(args[0]);i++){ num=num*i; } } public static void main(String args[]){ System.out.println(new Test1().testCount(args[0])); } } 好像这样做吧?? |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |