Printing a member of a previously added object into a linkedlist
<p>I am relatively new to java programming and i am currently trying to implement a Linked List in Java. I have a class called student. Which has the following members - Name, MarksObtained. Now, i want to add the various student objects to a linked list one by one.</p>

<blockquote>
  <p>My_query1: Again, while traversing the list i want to print only the
  member - MarksObtained. </p>
  
  <p>My_query2: The iterator interface method,
  itr.next() returns <strong><em>_</em>__<em>_</em>__<em>_</em>__<em>_</em></strong> ?</p>
  
  <p>My_query3: If i create
  objects of the class student with the same name iteratively and
  simultaneously add it to the linked list, is it valid?</p>
</blockquote>

<pre><code>public static void main(String []args){
    LinkedList al = new LinkedList();   
    for(int i=0; i&lt;100; i++){
           student s = new student();
           s.MarksObtained = i;
           s.Name = "blah";
           al.add(s);
    }
}
</code></pre>

<p>Thanks.</p>
