[BAEL-1615] Code to support article. (#3867)

* [BAEL-1615] Code to support article.

* Adding example of provides...with

* Adding uses to main module
This commit is contained in:
christopherfranklin
2018-04-11 14:27:31 -04:00
committed by Grzegorz Piwowarek
parent 61504c948b
commit ee036aacca
9 changed files with 40 additions and 0 deletions
@@ -0,0 +1,5 @@
package com.baeldung.modules.hello;
public interface HelloInterface {
public void sayHello();
}
@@ -0,0 +1,11 @@
package com.baeldung.modules.hello;
public class HelloModules implements HelloInterface {
public static void doSomething() {
System.out.println("Hello, Modules!");
}
public void sayHello() {
System.out.println("Hello!");
}
}
@@ -0,0 +1,4 @@
module hello.modules {
exports com.baeldung.modules.hello;
provides com.baeldung.modules.hello.HelloInterface with com.baeldung.modules.hello.HelloModules;
}