...
Consequently, a compliant solution is:
Foo.java
:
Code Block | ||
---|---|---|
| ||
class Foo { static private final int version = 1; static public final String getVersion() { return version; } // ... } |
Bar.java
:
Code Block | ||
---|---|---|
| ||
class Bar { public static void main(String[] args) { System.out.println("You are using version " + Foo.getVersion()); } } |
...