title: How to Exit Java Window after a command in Blue-J?
body: <p>I am making a Program to find Values of Roots of a given Quadratic Equation.
  This is the code -</p>
  
  <pre><code>import java.util.*;
  class Success
  {
     public static void main(String[] args)
  {
      String input1;
      Scanner sc=new Scanner(System.in);        
      System.out.println();
      System.out.println();
      System.out.println("-------------------------------------------------------------------");
      System.out.println("-------------------------------------------------------------------");
      System.out.println("!! Success !!");
      System.out.println("------- (-_-) -------");
      System.out.println();
      System.out.println("Let's Try Again!!!");
      System.out.println();
      System.out.println("Enter anything to Exit or 1 to go back to Main Menu.");              
      input1 = sc.nextLine();
       if(input1.equals("1"))
       {
         System.out.print('\f'); 
         Main_Menu.main(args);
       }
       else 
       {        
         System.exit(0);
       }
     }
  }
  </code></pre>
  
  <p>Here I use System.exit(0); to exit the program. But using this just minimizes the window. Is there any way to close the window.</p>
  
  <p>P.S - This is just a class which links to Main_Menu Class if the entered value is 1. This is not the full code!</p>
  
  <p><a href="https://i.stack.imgur.com/cPSl3.png" rel="nofollow noreferrer">Quadratic Equations - BlueJ Program - Image</a></p>
  
  <p>Thank You</p>