"val = _val" 开头的下划线是什么意思?它有什么深远的用途或深意吗?在 Java

What is the meaning of the leading underline of "val = _val"? Does it have some deep use or deep meaning? In Java

在一道算法题“链表实现队列”中,解法是先创建class节点:

class Node {
    public int val;
    public Node next;
    public Node(int _val) {
        val = _val;
        next = null;
    }
}

请问val = _val开头的下划线是什么意思?

_val 只是一个名字。此代码在各个方面都完全等同于

public Node(int iJustMadeUpAVariableName) {
  val = iJustMadeUpAVariableName;
  next = null;
}

并将 Node class 中的 val 字段初始化为传递给构造函数的值。