Skip to content

Commit 1f633b4

Browse files
committed
Split off sayHello() method for hotswap demo.
1 parent 969b9f5 commit 1f633b4

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/sample/java/project/SampleJavaProject.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,17 @@ public static void main(final String[] args) {
5656
sjp.run();
5757
}
5858

59+
/**
60+
* Print the "Hello, world!" string.
61+
*/
62+
public final void sayHello() {
63+
System.out.printf("Hello, %s!%n", name);
64+
}
65+
5966
@Override
6067
public final void run() {
6168
do {
62-
System.out.printf("Hello, %s!%n", name);
69+
sayHello();
6370
try {
6471
Thread.sleep(PRINT_DELAY);
6572
} catch (InterruptedException e) {

0 commit comments

Comments
 (0)