Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Variable named interface

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

like image 764
Deelazee Avatar asked Feb 20 '12 09:02

Deelazee


People also ask

What are variables in interface?

Interface variables are static because java interfaces cannot be instantiated on their own. The value of the variable must be assigned in a static context in which no instance exists. The final modifier ensures the value assigned to the interface variable is a true constant that cannot be re-assigned.

Can you declare a variable as an interface?

You can declare variables to be of an interface type, you can declare arguments of methods to accept interface types, and you can even specify that the return type of a method is an interface type.

What is variable in interface in Java?

🔔 The variable in an interface is public, static, and final by default. 🔔 If any variable in an interface is defined without public, static, and final keywords then, the compiler automatically adds the same. 🔔 No access modifier is allowed except the public for interface variables.


1 Answers

In the lines of clazz, you could use interfaze!

like image 121
Shyam Avatar answered Sep 21 '22 11:09

Shyam