add invoking static methods (#11439)

This commit is contained in:
Kai Yuan
2021-11-21 20:25:21 +01:00
committed by GitHub
parent 810d7031a6
commit 3caa9fdbbe
2 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
package com.baeldung.reflection.access.staticmethods;
public class GreetingAndBye {
public static String greeting(String name) {
return String.format("Hey %s, nice to meet you!", name);
}
private static String goodBye(String name) {
return String.format("Bye %s, see you next time.", name);
}
}