Variable named interface
-
28-10-2019 - |
Question
I need a variable that represents an interface. I was wondering if there is a "standard" name for such a variable, like for example the clazz for a Class variable. I was thinking of naming it aInterface, but I don't realy like this name...
Solution
In general my interface names start with I, like, IMyInterface
. And I use 'i' as prefix for variable name where I need to indicate the variable is interface, like iMyInterfaceVar
. But no such restriction or standard rule.
Just for sake of completeness, here is The Java Code Convention Guide
OTHER TIPS
In the lines of clazz
, you could use interfaze
!
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow