public class DemoStackOverflow {

    // Rekursi tanpa base case: setiap pemanggilan menumpuk frame baru
    static int turun(int n) {
        return turun(n - 1);
    }

    public static void main(String[] args) {
        try {
            turun(1);
            System.out.println("selesai");
        } catch (StackOverflowError e) {
            System.out.println("StackOverflowError terjadi: call stack penuh");
        }
    }
}
