Well, all is in the title...
I understand that both forms refer to the method, but I don't see what #
adds to the other form.
The hash character (#) is not part of the Java language.
It has a special use in javadoc. The specification states
package.class#member is any valid program element name that is referenced -- a package, class, interface, constructor, method or field name -- except that the character ahead of the member name should be a hash character (#).
and
As stated, the hash character (#), rather than a dot (.) separates a member from its class. This enables the Javadoc tool to resolve ambiguities, since the dot also separates classes, nested classes, packages, and subpackages. However, the Javadoc tool is generally lenient and will properly parse a dot if you know there is no ambiguity, though it will print a warning.
The notation doesn't only apply to methods, it applies to any type member. It helps remove ambiguity from fully qualified type names.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With