009-002-006
public Modifier: Greeting Function
Easy
Problem Description
public Modifier: Greeting Function
In this problem, you will create a program that implements a public greet method which takes a name as input and displays a greeting message to standard output.
Learning Objective: Provide externally accessible functions with public methods
Create a class that defines a greet method with the public modifier. This method receives a name as a parameter and must be callable from external classes (e.g., the Main class).
Input
Line 1: Name (string)
Output
Hello, [name]!
Let's do our best today!
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up