title: Import declarations deleted after I "save as" using Eclipse
body: <pre><code>import static java.lang.System.out;
  import java.util.Scanner;
  
  public class alphabets {
  
      public static void main(String[] args) {
          Scanner keyboard = new Scanner(System.in);
          out.print("Which verse?");
          int verse = keyboard.nextInt();
  
          switch (verse) {
          case 1:
              out.println("AAAA");
              break;
          case 2:
              out.println("BBBBBB");
              break;
          case 3:
              out.println("CCCCC");
              break;
          case 4:
              out.println("DDDD");
              break;
          default:
              out.println("No such verse");
              break;
  
          }
  
          out.println("The Alphabet.");
  
      }
  }
  </code></pre>
  
  <p>Every time I "save as" the import java.util.Scanner; is deleted. And obviously after this the program will not run because the deleted import is missing. I have tried Preferences> Editor> Save Actions> Configure> Remove Unnecessary Casts. This doesn't work (though I am not sure this is what I should do). Any guidance would be wonderful. Thanks.</p>