I'm trying to compare the way a BST is implemented in Java and C++. In Java a Node would look something like
In the Java code the class type (
right) member declarations implicitly declare pointers. There is no special notation for a pointer in Java, because most everything is handled via pointers. These are called pointers in the Java language specification, but they're known to most Java programmers as references.
In your example it's essentially just the syntax that differs between Java and C++, but do note that neither C++ pointers nor C++ references correspond directly to Java pointers.
Also note: You may encounter arguments that Java doesn't have pointers. For some reason that I can't grok (why are they unfamiliar with the specification of their favorite language, and why are they able to ignore e.g. getting
NullPointerException on the screen?) some Java programmers will vehemently deny that the language has pointers. This is a mystery, but it can safely be ignored, I think.