All Questions
3 questions
0
votes
1
answer
325
views
Empty a linked-list object [duplicate]
I have my linked list code:
#include <string>
#include <iostream>
using namespace std;
class Node
{
public:
string name;
int age;
Node *next;
Node(string name, int age)
...
0
votes
3
answers
3k
views
How to retrieve object's contents from a node within a Linked List in java [duplicate]
I created a Person Object that takes a string and an integer. I created a Node class to take in type generic as input. When I debug, I can see the objects are created, and stored, but my output is ...
-1
votes
3
answers
714
views
Why am I getting a NullPointerException when inserting at the end of my custom linked list?
Here's my Node object:
public class Node<Any> {
protected Any data;
protected Node<Any> link;
public Node() {
this.data=null;
this.link=null;
}
public Node(Any data, Node<...