In Java, you can find the sum of the first n natural numbers using recursion.
Formula for Sum of First n Natural Numbers
The sum of the first n natural numbers is given by: https://docs.vultr.com/java/examples/find-the-sum-of-natural-numbers-using-recursion