When answering questions, I often mention method names and online documentation. I am confused about how method names should be indicated in the text.
For example, I often print:
String.equals() should be used to compare two strings for equality.
However, this is a bit misleading:
- It makes
equals() indicator of a static member. - This means that
equals() does not accept any arguments.
In the interest of satisfaction, I would like to know:
What is the correct way to access both static members and instance members?
I have seen things like:
- String.equals ()
- String # equals ()
- myString.equals ()
Is there a way to refer to methods with an argumentative-agnostic way?
For example, in C foo(void) explicitly uses a function with a null argument, and foo() can be overridden later to have a different set of arguments. (?)
Matthew willis
source share