不断把值赋值给自己定义的变量就行了。1、自定义一个变量int self = 0;2、通过for循环给self赋值for(int i=0;i<100;i++){self = i;//for循环,从0到99,依次赋值给自定义变量self}