Skip to main content

Programming using Java Hands On - Control Structures | Print Username

 

Print Username

Jeffy, who is going to complete the higher education in this year needs to create a simple application which accept the name of a person and welcome them with a message along with their name. She wants to read the data using the class "Scanner". Implement this scenario using Java.

Sample Input 1: 

Enter the name:

Johson

Sample Output 1:

Welcome Johnson.


Sample Input 2: 

Enter the name:

Stain Polson

Sample Output 2:

Welcome Stain Polson.



 

Result Description

Summary of tests
*Note: All the test cases might not have same weightage
+------------------------------+
|  2 tests run/ 2 tests passed |
+------------------------------+
 

Comments

Subscribe to Get's Answer by Email