23 lines
416 B
Java
23 lines
416 B
Java
|
package VL05.Aufgabe03;
|
||
|
|
||
|
/**
|
||
|
* Vorlesung 5 / Aufgabe 3
|
||
|
*
|
||
|
* @author Sebastian Brosch
|
||
|
*/
|
||
|
public class Aufgabe03 {
|
||
|
public static void main(String[] args) {
|
||
|
loop(1);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Method to create a recursive infinite loop.
|
||
|
*
|
||
|
* @param counter The counter to measure the depth of the recursion.
|
||
|
*/
|
||
|
private static void loop(int counter) {
|
||
|
System.out.println(counter);
|
||
|
loop(++counter);
|
||
|
}
|
||
|
}
|