[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:
committed by
Grzegorz Piwowarek
parent
61504c948b
commit
ee036aacca
+5
@@ -0,0 +1,5 @@
|
||||
package com.baeldung.modules.hello;
|
||||
|
||||
public interface HelloInterface {
|
||||
public void sayHello();
|
||||
}
|
||||
+11
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user