Also, I personally would use:
System.out.println(b.getStudNum());
Instead of including the new line char in the String.
Type: Posts; User: JavaPF
Also, I personally would use:
System.out.println(b.getStudNum());
Instead of including the new line char in the String.
The value 0510180 is too long to be an Integer.
I suggest handling it as a String like this:
public class Student {
String Name, Course;
String StudentNumber;
Hello tazjaime and welcome to the forums :D
I just compiled the code you posted above and it all works fine?
I get the output:
charles
cB.S. Computer Science