Skip to content

CircleLinkList has a problem,i think #436

Description

@picturetxl

public void display()
{
Node current=head;
for (int i = 1; i <= size; i++) {
System.out.println(current.next.value);
current=current.next;
}
}

public static void main(String[] args)
{
    CircleLinkList<String> cl= new CircleLinkList<>();
    cl.append("hello");
    cl.append("world");
    cl.append("and");
    cl.append("java");

    cl.display();
    // System.out.println("hello java");
}

/**OutPut: Is it wrong? i have no idea
java
null
java
null
*/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions