This will be a little bit clearer if we use correct style:
public class Node {
int data;
Node next;
Node (int data) {
this.data = data;
}
}
Node is a class. Each Node instance has a field (data) to hold an integer value, and a field (next) to hold a reference to another Node instance.
(As noted in the comments, all Java classes are types, so Node next; is declaring a field whose name is next and whose type is Node. Furthermore, every Node instance will have one of these fields ... that can refer to another Node instance.)
So, to create a linked list from Node instances, you link one Node to the next one in the list using (naturally) the next field. The last Node in the list (typically) has a null in its next field.
But I thought there is no such type as a node.
Every Java class is a type, and we just defined node (or more correctly Node) as a Java class.
So, it is just creating a new object called next. Am I right?
Not exactly. You would be creating an object (a Node instance) and assigning the object's reference to the next field of some other Node instance.
The object is not called next. It is the field that is called next. And the field contains a reference to an object rather than an object itself.
(These small distinctions in the terminology are actually important to understanding what is really going on.)