Results 1 to 4 of 4

Thread: quick question

  1. #1
    swp
    swp is offline Member
    Join Date
    Sep 2011
    Posts
    9
    Rep Power
    0

    Default quick question

    DoubleLinkedSeq x = new DoubleLinkedSeq( );
    DoubleLinkedSeq y = new DoubleLinkedSeq( );
    x.addBefore(41); // Inserts 41 into the list x
    x.addBefore(42); // Inserts 42, so that x is now 42, 41 with cursor at front
    y = (DoubleLinkedSeq) x.clone( );
    x.addAfter(43); // Attaches 43 so that x is now 42, 43, 41 with cursor at 43
    y.advance( );
    System.out.println("y size is " + y.size( ));
    System.out.println(" and y current item is " + y.current( ));

  2. #2
    swp
    swp is offline Member
    Join Date
    Sep 2011
    Posts
    9
    Rep Power
    0

    Default Re: quick question

    oh sorry, whats the output?

  3. #3
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default Re: quick question

    We don't do your homework for you here. Run it yourself, or think it through.

  4. #4
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,789
    Rep Power
    7

    Default Re: quick question

    If you cannot read my answer above it was obviously quicker than your question.

Similar Threads

  1. Quick question
    By Qsc in forum New To Java
    Replies: 6
    Last Post: 07-25-2011, 04:36 AM
  2. quick question
    By biggerthanblue in forum New To Java
    Replies: 2
    Last Post: 04-10-2011, 04:33 AM
  3. Really quick question
    By shadycharacter in forum New To Java
    Replies: 2
    Last Post: 04-22-2010, 10:06 PM
  4. Hello everyone! quick question.
    By irishhokie in forum New To Java
    Replies: 5
    Last Post: 04-03-2009, 04:13 AM
  5. Quick Question
    By Spenc in forum New To Java
    Replies: 3
    Last Post: 09-22-2008, 02:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •