title: Java: how to pass arguments into constructor? Undefined method error?
body: <p>Ok, so I'm in need of some basic help. Here's the tutorial I'm trying to learn from (<a href="http://docs.oracle.com/javase/tutorial/java/javaOO/classes.html" rel="nofollow">http://docs.oracle.com/javase/tutorial/java/javaOO/classes.html</a>), but I'm confused as to how to actually pass data into it. The problem is I've got my Pascal brain on when trying to learn java...</p>
  
  <p>Here's my code. What am I doing wrong?</p>
  
  <pre><code>public class OrigClass{
      public static void main(String[] args){
          StudentData(17, "Jack"); //error here: the method StudentData(int, String) is undefined for the type OrigClass
      }
  
      public class Student{
          public void StudentData(int age, String name){
              int sAge = age;
              String sName = name;
              System.out.println("Student Name: " + sName + " | Student Age: " + sAge);
          }
      }
  }
  </code></pre>
  
  <p>Thanks in advance for the help :)</p>