title: Need help sending user input to another method
body: <p>Let me give a quick explanation. I took a 5 week course through a company on Java in July. They covered basic stuff, like console app, crud operations, mysql, and n-tier architecture. Since the course ended I didn't use it much because I went back to work, and other medical reasons surfaced....blah blah.</p>
  
  <p>I was told by the company to make a simple program to reflect what I learned. Turns out I retained very little. </p>
  
  <p>I decided to make a video game starage program. It would be used to stare your video games so you wouldn't have to search your bookcase(or how ever you store your games.)</p>
  
  <p>To cut to the chase I can't seem to get user input from one clas to another. My method AddGame In my presentation layer is supposed to send the user input to the NewGame method in my logic layer. the error i keep getting is that column 'title' cannot be null. </p>
  
  <p>Here is my AddGame method</p>
  
  <pre><code>    public static Games AddGame() {
      Games g = new Games();
      Logic aref = new Logic();
      Scanner scanline = new Scanner(System.in);
      System.out.println("Please enter the title of your game:");
      scanline.nextLine();
      System.out.println("Please enter the rating of your game:");
      scanline.nextLine();
      System.out.println("Please enter the platform for your game:");
      scanline.nextLine();
      System.out.println("Please thenter the developer of your game:");
      scanline.nextLine();
      aref.NewGame(g);
      return g;
  
  }
  </code></pre>
  
  <p>here is my NewGame Method</p>
  
  <pre><code>    public static void NewGame(Games g)
  {
      try {
           Class.forName(driver).newInstance();
           Connection conn = DriverManager.getConnection(url+dbName,userName,password);
           PreparedStatement ps = (PreparedStatement) conn.prepareStatement("INSERT INTO games(Title,Rating,Platform,Developer) " +
                  "VALUES(?,?,?,?)");
           ps.setString(1, g.getTitle());
           ps.setString(2, g.getRating());
           ps.setString(3, g.getPlatform());
           ps.setString(4, g.getDeveloper());
           ps.executeUpdate();
           conn.close();
  
           } catch (Exception e) {
           e.printStackTrace();
  }
  }
  </code></pre>
  
  <p>I have not learned how to use hibernate and only know how to make a console app. Everything I have looked up has either been hibernate or web app. (sorry if code seems sloppy or crappy)
  Please any advice would be very helpful. Thanks in advance!</p>