Filename or file name?

Possible duplicate:
Parameter naming: filename or filename?

What do you use - file name or file name? Classes in the JDK use the lowercase "n", for example. FilenameFilter, therefore, for consistency, me too. But the right way, I believe, should be fileName (as in C #).

+5
source share
5 answers

I would base this solution on surrounding identifiers.

If filenameis the only file identifier in its context, I remain with that.

Example:

public void load(String filename) { ... }

But as soon as you have other file attributes, I would think about this:

private String fileName;
private long fileSize
private DateTime fileAge;
+9
source

: " " " " .
- .

filename, " ", " ".

" " .

+3

_

, Java.

+1

, " ", , " " - , .

+1

All Articles