- `NAMES = fieldnames (S)`
- `NAMES = fieldnames (OBJ)`
- `NAMES = fieldnames (JAVAOBJ)`
- `NAMES = fieldnames ("JAVACLASSNAME")`

Return a cell array of strings with the names of the fields in the specified
input.

For a structure, return the structure field names. For an object, return the
public property names.

See also: `isfield`, `struct`, `methods`.

### References

- https://www.mathworks.com/help/matlab/ref/fieldnames.html
- https://octave.sourceforge.io/octave/function/fieldnames.html
