Answer the question
In order to leave comments, you need to log in
Do I need to prefix variable and class names?
From time to time I come across a class name like IClassName - the first letter I denotes an interface. The clean code mentioned this and kind of thought it was wrong.
I don't see any point in using the letter m in variable names.
What do you think about this?
Answer the question
In order to leave comments, you need to log in
This is not accepted in java. Usually just the name of a class or interface.
Those. just ClassName regardless of whether it is an interface or a class.
variables are just someVariable without prefixes, etc.
Read the code style guidelines source.android.com/source/code-style.html#java-lan... . Classes do not need a prefix, field names do.
Non-static, non-public fields start with "m",
static fields start with "s",
constants - in uppercase without prefixes, the
rest - whatever you want, starting with a lowercase letter.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question