Can anyone would provide me an example of reference-based linked list?
I'm trying to create a reference based linked list anyone would be able to provide me an example 开发者_开发知识库of it??
This isn't an answer as such but the following domain class should get you started:
public class Element{
private Object objectLink;
private Element nextElement;
private Element previousElement;
// Getter and setter methods here
}
What you need to add to this is a class that allows adding, removal and checking the state of the list (empty, size, etc.).
精彩评论