Loading Java...
ACUBENS Learn Java Programming
Welcome to Acubens

Master the Art of
Java Programming

A comprehensive journey from the basics to advanced OOP, streams, and I/O. Learn syntax, data types, collections, OOP, exception handling, and more.

9 Chapters
80+ Programs
Self-paced
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
public class Main {

    static int factorial(int n) {
        if (n <= 1) return 1;
        return n * factorial(n - 1);
    }

    public static void main(String[] a) {
        System.out.println(factorial(5));
    }
}
// Output: 120
Explore Topics View full course โ†’