Assignment #124: File Sum

Code

  import java.io.File;
import java.util.Scanner;

public class FileSum {

    public static void main(String[] args) throws Exception {
    
        Scanner input = new Scanner(new File("Numbers.txt"));
        
        int a, b, c;
        
        System.out.println("Getting numbers: ");
        a = input.nextInt();
        b = input.nextInt();
        c = input.nextInt();
        
        System.out.println(a + " + " + b + " + " + c + " = " + (a + b + c));
        
    }
    
}
    

Picture of the output