title: Convert a text file to a sql file
body: <p>I am working on an assignment that open a text file and convert/save as sql file. I got how to open a text file but I am stuck on how to convert to sql file.</p>
  
  <p>Here is code that I got for reading the text file</p>
  
  <pre><code>    public static void main(String[] args) {
  
          // The path to open the file.
          String fileName = "input.txt";
          String line = null;
  
          try {
              // The file reads text files 
              FileReader file = new FileReader(fileName);
  
              // Wrap file in BufferedReader
              BufferedReader bufferedReader = new BufferedReader(file);
  
              while ( (line = bufferedReader.readLine()) != null ) {
                  System.out.println(line);
              }
  
              // Close files
              bufferedReader.close();
          } catch ( FileNotFoundException ex ) {
              System.out.println("Unable to open file '" + fileName + "'");
          } catch ( IOException ex ) {
               ex.printStackTrace();
          }
      }
  </code></pre>
  
  <p>Can you anybody give me some hint how to save a text file as sql file after reading the text file?</p>
  
  <p>Thank you so much!</p>