+ 1
How can i access the value of variable inside interface in java from the main function?
Pls help me understand this with some programming example.
2 Answers
+ 4
By using dot notation...
interface Test{
int x=1;
}
in main:
System.out.println(Test.x);