VL-Programmieren/VL05/Aufgabe03/Aufgabe03.java

23 lines
416 B
Java
Raw Normal View History

2024-05-09 10:32:30 +00:00
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);
}
}