The Artima Developer Community
Sponsored Link

Java Answers Forum
a Linked Lists problem

2 replies on 1 page. Most recent reply: Mar 10, 2002 5:17 PM by Amber K

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Amber K

Posts: 6
Nickname: amberk
Registered: Mar, 2002

a Linked Lists problem Posted: Mar 10, 2002 10:23 AM
Reply to this message Reply
Advertisement
Problem type: Linked Lists / Java Data Structures
Problem: Rewrite the following method segment with a native array. For example, you could start with
char [] letters = new char[10];
letters [0] = 'f';

The method ->

LinkedList letters = new LinkedList();

ListIterator itr = letters.listIterator();

itr.add (new Character ('f'));
itr.add (new Character ('t'));
itr.previous();
itr.previous();
itr.add (new Character ('e'));
itr.add (new Character ('r'));
itr.net();
itr.add (new Character ('e'));
itr.add (new Character ('c'));
itr = letters.listIterator();
itr.add (new Character ('p'));
gui.printlin (letters);

--------------------------
A complete solution would be awesome! and thank you in advance!

Amber :)


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: a Linked Lists problem Posted: Mar 10, 2002 3:42 PM
Reply to this message Reply
What is going on here, Amber? Are you trying to get solutions to all the possible assignments in your homework list?

Once again, here is the URL I've come to know and love (I'm still trying to get Bill to add a link to it on the forum post page!): http://www.tuxedo.org/~esr/faqs/smart-questions.html

Don't despair in my ascerbic response, Charles is probably pumping out each of the complete programs for you at this moment... ;-)

Amber K

Posts: 6
Nickname: amberk
Registered: Mar, 2002

Re: a Linked Lists problem Posted: Mar 10, 2002 5:17 PM
Reply to this message Reply
Sorry Matt, actually I finished most of the homework, just just couldnt get the answers to those I posted. And my professor dont have a key for us to compare our answers to. Who is Charles btw?

Amber

Flat View: This topic has 2 replies on 1 page
Topic: I keep getting an error message, I cant quite see whats wrong in my code Previous Topic   Next Topic Topic: how get todays Date with format in Date Object

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use