Ok, so I'm in need of some basic help. Here's the tutorial I'm trying to learn from (http://docs.oracle.com/javase/tutorial/java/javaOO/classes.html), 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...
Here's my code. What am I doing wrong?
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);
}
}
}
Thanks in advance for the help :)