Here's a Java program to print the sum of two integers:


public class SumOfIntegers
public static void main(String[] args)
int num1 = 10;
int num2 = 20
int sum = num1 + num2;
 System.out.println("Sum of " + num1 + " and " + num2 + " is: " + sum); 
 } 
}

Explanation:

We define a class called SumOfIntegers.

In the main method, we declare two integer variables num1 and num2, representing the two integers whose sum we want to find. You can modify these variables with your desired integer values.

We add num1 and num2 to calculate their sum and store it in the variable sum.

We use the System.out.println() statement to print the sum to the console.

When you run this program, it will output the sum of the two integers num1 and num2 on the console.


For the given values of num1 = 10 and num2 = 20, the output will be:

Sum of 10 and 20 is: 30

You can modify the values of num1 and num2 in the main method to test the program with different integers.