IO and Scanner exception handling
Your code is interesting, in the sense that it appears to have been pulled from about 4 different text books all related to Java about 4 versions ago.... actually, make it Java 1.3.

It is consistent code, but everything is just.... old.

In some sense of order, the following strike me most:


multicatch
try with resources
don't catch Exception
don't just print the exception's toString, print the full stack.
Brace on same line
don't *-import.
don't pre-declare variables... declare at use-time.
redundant comments


On the other hand, your variable names are great, and the basic concept is sound.

Here's my version of your code:

import java.io.FileReader;
import java.io.IOException;
import java.util.InputMismatchException;
import java.util.Scanner;

public class ReadNum {
    public static void main(String[] args) {
        try (Scanner inFile = new Scanner(new FileReader("sample.txt"))) {

            int num1 = inFile.nextInt();
            int num2 = inFile.nextInt();

            int sum = num1 + num2;

            System.out.println("sum " + sum);
        } catch (IOException | InputMismatchException ex) {
            ex.printStackTrace();
        }
    }
}