title: how to call non-static methods in main method
body: <p>im trying to make a program where the user enters a number and the console is that fibonacci number. im having trouble figuring out why the like fibbonaci fib = new fibonacci is stopping my program. when the computor reads that line, the code juts stops to run. </p>
  
  <p>Edit: Thanks so much for the answers guys, but im still having trouble understanding. could somone please rewrite the code so that the error is fixed? thanks!</p>
  
  <p>Edit: i figured it out, thanks for all the help!</p>
  
  <pre><code>import java.util.Scanner;
  
  public class fibonacci {
      Scanner fnumber = new Scanner (System.in);
      int input = fnumber.nextInt();
      int f1 = 1;
      int f2 = 1;
      int answer = f1 + f2;
  
      public int fibonacci( int input) {
          for(int f2 = 1; f2&lt;input; f2++ ) {
              int answer = f1 + f2;
              f1 = f2;
              f2 = f2 + 1;
          }
          return answer;
      }
  
      public static void main(String args[]){
          System.out.println("please enter a number");
          Scanner fnumber = new Scanner (System.in);
          int input = fnumber.nextInt();
          System.out.println("The " + input + "th number of the fibonacci sequence is " + fib.fibonacci(input));
      }
  }
  </code></pre>