so basically “Node” is a pre defined class in java or a keyword that we have used for “next”.
can we use another word other than “Node” for mentioning “next”
so basically “Node” is a pre defined class in java or a keyword that we have used for “next”.
can we use another word other than “Node” for mentioning “next”
Node is not predefined class. Node is a class you have defined(user defined.)
class is a keyword , Node and next both are identifier_name…
Read a little bit about Basic elements of programming language like keywords, identifiers and their rules.
identifier names can be anything.
Like I can define a class of my name.
eg.
class gaurav{
int x;
int y;
gaurav g;
};
class names(like gaurav) become data type(user defined data type.).
so here x and y of type int , and g of type gaurav.
so yes, “Node” and “next” both can be replaced by any other name.
Thanks.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.