English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

3 answers

A common set of conventions is:

startsWithLowerCase for variables and method names.
StartsWithUpperCase for class names.
ALLCAPS for constants.

Some programmers use underscore instead of mixed case, as in starts_with_lower_case and ALL_CAPS. however, it goes against convention to begin a logical name with underscore, as in _thisVariable.

2007-12-28 22:51:48 · answer #1 · answered by jgoulden 7 · 0 0

MyClass -- is by convention Cap 1st letter, humpback notation
MyClass.addNumber() -- is by convention a lowercase, humpback. A method() has parens.
BASENUMBER -- is a constant, by convention all CAPS and when I see it in code I know it is special
myVariables -- are lowercase, often humpback notation

Some hackers go so far as _addNumber() and _myVariable to specify a Class variable and/or method to distinguish from local variables.

2007-12-28 22:33:48 · answer #2 · answered by Anonymous · 0 0

nicely what you're able to do right this is person interface and implementation class.. determine you upload what variables and techniques you desire to apply on your aaa and bbb class interior the interface class and explicitly outline it on your implementation class. as quickly as you utilize that determine you're making larger the two those instructions (aaa and bbb) to that interface class. Lemme understand in case you have any questions approximately that! would be happy to assist ya! :)

2016-12-18 11:00:09 · answer #3 · answered by ? 4 · 0 0

fedest.com, questions and answers