日期:2014-05-20 浏览次数:20970 次
package control;
public class MakeArrary
{
public static int[] Test(int statr,int end)
{
int[] z = null;
if(statr<=end)
{
int y=end-statr;
for(int x=statr,i=0;x<=y;x++,i++)
{
z[0+i]=x;
}
}
else
{
z=null;
}
return z;
}
public static void main(String[] args)
{
int[] z=Test(1,100);
int y=z.length;
for(int x=0;x<=y-1;x++)
{
System.out.print(z[x]);
}
}
}