1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Getting Info from an arraylist.

Discussion in 'Java' started by Fuzzyfella, Dec 3, 2011.

  1. Fuzzyfella

    Fuzzyfella New Member

    Joined:
    Dec 3, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi all,
    I'm a newbie to programming and Java and am trying to print a string from an arraylist. I have a class 'student' and a class 'course' which contains the Arraylist <Student> students. How do I return the string for the student variable studName.

    I tried:
    System.out.prinln("Student Name: " +students.getStudName);
    But its telling me that it cant find variable studName and I cant find a similar problem anywhere to point me in the right direction.

    Any help would be greatly appreciated.
     

Share This Page