lbgladson's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Members
Active Posts:
43 (0.05 per day)
Joined:
04-February 12
Profile Views:
509
Last Active:
User is offline Sep 29 2012 12:33 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   lbgladson has not set their status

Posts I've Made

  1. In Topic: Linked List

    Posted 18 Sep 2012

    I looked at another program I had written with Linked Lists and decided to use an iterator to write the program. Now I have the below code that is printing the list but not reversing it.

    import java.util.LinkedList;
    import java.util.ListIterator;
    
    import javax.swing.text.html.HTMLdocument.Iterator;
    
    public class Reverse {
    	public static void reverse(LinkedList<String> staff) {
    
    		ListIterator<String> staffIterator = staff.listIterator();
    
    		LinkedList<String> reversed = new LinkedList<String>();
    		while (staffIterator.hasPrevious()) {
    			reversed.add(staffIterator.previous());
    		}
    	}
    }
    
    

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

lbgladson hasn't added any friends yet.

Comments

lbgladson has no profile comments yet. Why not say hello?