A basic idea for both novice and seasoned Java developers is how to use a for loop to calculate the sum of n values. A for loop in Java adds each number in the series again, making it easier to sum natural numbers. Starting with an integer variable to hold the total, you create a loop that goes from 1 to n and continue adding each value to the sum inside the loop to get the sum of n numbers in Java using a for loop.