title: Is it possible to use input data to change object variables? Java
body: <p>I've been attempting to use Scanner to ask for user inputs which will then be written to a object to save them.
  However I've been running into conflicts with Static and Non Static Variables. My understanding of Static is that if I were to write my class as static it would prevent me from altering it, however I also cannot make my Main statement not be static.</p>
  
  <pre><code>import java.util.Scanner;
  class Booking{
      public class Ticket{
          int Amount;     //To be used to record how many of a specific ticket are needed.
          int Price =6;
          public void SetAmount(int Order){
              this.Amount = Order;
          } 
      }
      public static void main(String args[]) {
          Scanner myScanner = new Scanner(System.in);
          Ticket Booking = new Ticket();
          System.out.println("How many tickets would you like?")
          int AmountBooked = scan.nextInt();
          Booking.SetAmount(AmountBooked);
      }
  }
  </code></pre>
  
  <p>I'm fairly sure there are other errors in this code however over time I've tried to re run it with so many different parts commented out I am certain that the error is with the line 'Ticket Booking = new Ticket();' So I'd appreciate if that could be focused on.</p>