Topic: 问个问题

  Print this page

1.问个问题 Copy to clipboard
Posted by: znn1980
Posted on: 2005-01-30 15:16

能不能把main方法,放到一个过程里,在用main方法调用这个过程?

public class Text
{
  public static void main(String args[])
  {
    int k;
    int[] a;
    a=new int[args.length];
    for(int i=0;i<args.length;i++)
    {
      k=(Integer.parseInt(args[i]));
      
      
     for(int j=0;j<a.length;j++)
     {
       a[i]=k;
      
     }
     System.out.printKiss;
    }    
  }
}

2.Re:问个问题 [Re: znn1980] Copy to clipboard
Posted by: znn1980
Posted on: 2005-01-30 16:24

也就是说能不能把命令行参数保存在一个过程中,然后在main方法里调用


   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