Assignemnt #125 and Summing Three Number From Any File

Code

     ///name: Mark Katz
    ///period: 6
    ///Program name: Summing Three Numbers From Any File
    ///file name: STNFAF.java
    ///date finished: 6/1/16
    
    import java.util.Scanner;
    import java.io.File;
    
    public class STNFAF {
        
        public static void main(String[] args) throws Exception{
            
            Scanner kb = new Scanner(System.in);
            Scanner fileOut1 = new Scanner(new File("3nums1.txt"));
            Scanner fileOut2 = new Scanner(new File("3nums2.txt"));
            Scanner fileOut3 = new Scanner(new File("3nums3.txt"));
            
            int choice, num1, num2, num3, sum;
            
            System.out.print("Which file would you like to draw from? (1-3) ");
            choice = kb.nextInt();
            
            if (choice == 1)
            {
                num1 = fileOut1.nextInt();
                num2 = fileOut1.nextInt();
                num3 = fileOut1.nextInt();
                
                sum = num1 + num2 + num3;
            }
            else if (choice ==2)
            {
                num1 = fileOut2.nextInt();
                num2 = fileOut2.nextInt();
                num3 = fileOut2.nextInt();
            
                sum = num1 + num2 + num3;
            }            
            else
            {
                num1 = fileOut3.nextInt();
                num2 = fileOut3.nextInt();
                num3 = fileOut3.nextInt();
            
                sum = num1 + num2 + num3;
            }       
            
            System.out.println(num1 + " + " + num2 + " + " + num3 + " = " + sum);
        }
    }              
    Assignment 98