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...

有帮助吗?

解决方案

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

其他提示

In the lines of clazz, you could use interfaze!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top