[ACCEPTED]-fileName or filename?-naming-conventions
I'd base that decision on the surrounding 4 identifiers.
If filename
is the only identifier regarding 3 files in its context, I'd stay with that.
Example:
public void load(String filename) { ... }
But 2 as soon as you have other file attributes 1 I'd consider using this:
private String fileName;
private long fileSize
private DateTime fileAge;
my dictionary says "filename" so 1 i'd keep using a lowercase "n": http://dict.leo.org/?search=filename
The real question is whether the thing is 5 called "file name" or "filename".
The 4 rest is then a trivial matter.
The Wikipedia 3 article is filename, even though the content has 2 both "file name" and "filename".
Personally 1 I vote for "filename".
filename
Like you, I do it to be consistent with 1 the Java libraries.
I'm not really consistent, but I tend to 3 use "filename", even though fileName would 2 be more grammatically correct since "file 1 name" is two words, not one.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.