title: Why i should have been used try-catch?
body: <p>Good day, 
  Why in video lessons one human was not using try-catch, and, if i not be using try-catch i have an error IOException on createnewFile(), FileWriter etc.
  Maybe this is easy, i from c++, its big question for me.</p>
  
  <p>Thats my code:
  PS. Sorry for "best english"</p>
  
  <pre><code>public static void main(String[] args) {
      System.out.println("Hello World");
      File file1 = new File("temp.txt");
      if(!file1.exists()) {
          System.out.println("Creating file...");
          try
          {
              file1.createNewFile();
          }
          catch (IOException e)
          {
              e.printStackTrace();
          }
      }
  
      try
      {
          FileWriter fw = new FileWriter(file1);
          BufferedWriter out = new BufferedWriter(fw);
          out.write("aString");
          out.flush();
          out.close();
  
          FileReader fr = new FileReader(file1);
          BufferedReader in = new BufferedReader(fr);
          while(in.ready()) {
              System.out.println(in.readLine());
          }
      }
      catch (IOException e)
      {
          e.printStackTrace();
      }
  }
  </code></pre>