import java.util.Scanner; // program uses class Scanner
import java.util.Locale;  // international format library Locale
import javax.swing.*;     //Java swing graphic library
import java.io.*;         //Java input library for File class

public class BPIH1E5D
{
     // main method begins execution of Java application
     public static void main( String args[] ) throws FileNotFoundException
     {
         // create Scanner to obtain input from a file
        String filename=JOptionPane.showInputDialog("Enter file name (a.txt): ");
        Scanner input = new Scanner(new File(filename));
        Locale us=new Locale("US");
        input.useLocale(us);            
        double number1; // first number to add   
        double number2; // second number to add  
        double sum; // sum of number1 and number2
        number1 = input.nextDouble(); // read first number from user
        number2 = input.nextDouble(); // read second number from user
        sum = number1 + number2; // add numbers
        String s=String.format(us,"Sum is %10.5f\n", sum );
        System.out.println(s); // display sum
     } // end method main
} // end class BPIH1E4
