title: Trying to rerun a class in java
body: <p>I posted a question here recently but I was not specific enough so I reduced my code to the bare minimum. I'm trying to use joption pane to ask the user to rerun the program but it only runs once or I recieve the error "method main in class FahrenheitToCelcius cannot be applied to given types" I don't know what to put for main on the rerun while statement.</p>
  
  <pre><code>public class FahrenheitToCelcius
  {   
  public static void main(String[] args)
      {        
      FahCel conv = new FahCel();
      conv.setFahren();
      conv.getCel();
      Rerun();
      System.exit(0);       
      } 
      public static void Rerun()  
      {
      int answer;
      answer = 0;
      answer = JOptionPane.showConfirmDialog(null, 
              "Click 'yes' to run again or 'no' to exit",
              "Rerun Program?",
              JOptionPane.INFORMATION_MESSAGE);
      while (answer == 0) 
              {
                  main;
                  answer = JOptionPane.showConfirmDialog(null, 
              "Click 'yes' to run again or 'no' to exit",
              "Rerun Program?",
              JOptionPane.INFORMATION_MESSAGE);
              }        
        }
     }
  </code></pre>
  
  <p>And the class</p>
  
  <pre><code>import java.util.Scanner;
  public class FahCel 
  {
  Scanner keyboard = new Scanner(System.in);
  private double Fahr;
  private double FinalC;
  
  public void setFahren()
  {
      System.out.println("Total number of degrees in Fahrenheit to be Converted into Celcius?");
      Fahr = keyboard.nextInt();
  }
  public void getCel()
  {
      FinalC = 5/9.0*(Fahr-32);
      System.out.println("Temperature in Celcius is: " + FinalC);
  }   
  }
  </code></pre>