static class Node {
int data;
Node next;
Node(int v) {
data = v;
}
}//成员类,代表节点,类似于C++语言中的结构体
static Node head = new Node(1);//头节点单列出来
static void init() {
Node x = head;
for (int i = 1; i <= 10; i++) x = (x.next = new Node(i));//建立单向链表
x.next = null;
}
这是一个链表的部分的代码
请问其中的 x = (x.next = new Node(i));这一句是什么意思;
还可以怎么表示?(还可以写成哪几句?)