class Node {
String name;
Node next;
}
public class Main {
public static void main(String[] args) {
Node current = null;
Node first = new Node();
Node second = new Node();
Node third = new Node();
first.name = "James Gosling";
first.next = second;
second.name = "2023";
second.next = third;
third.name = "Sun Microsystem";
third.next = null;
current = first;
while (current != null) {
System.out.println(current.name);
current = current.next;
}
}
}