Greetings
Every time the program reaches its main() part, you want it to greet the user by wishing them a good day.
Deze oefening maakt deel uit van de cursus
Intermediate Java
Oefeninstructies
- Insert the
statickeyword before the custom method. - Call the custom method
genericGreeter()insidemain().
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
class Greeter {
// Enter the keyword to be able to access it in main
____ void genericGreeter() {
System.out.println("Nice day to you !");
}
public static void main(String[] args) {
// Call the above function to have the program greet you
____();
}
}