public class Array {
static int a[] = new int[101];
int counter = 0;
public int add(int num) {
if (num <= 100) {
Array.a[this.counter] = num;
System.out.println(a[this.counter]);
this.counter++;
return add(num + 1);
}
return 0;
}
public static void main(String[] args) {
Array c = new Array();
c.add(1);
}
}