Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Consequently, a compliant solution is:

Foo.java:

Code Block
bgColor#ccccff
class Foo {
  static private final int version = 1;
  static public final String getVersion() {
    return version;
  }

  // ...
}

Bar.java:

Code Block
bgColor#ccccff
class Bar {
  public static void main(String[] args) {
    System.out.println("You are using version " + Foo.getVersion());
  }
}

...