File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
suresh/src/main/java/com/lftechnology/phpjava/assignmentone Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .lftechnology .phpjava .assignmentone ;
2+
3+ import java .util .Scanner ;
4+
5+ public class FullNameSalutation {
6+
7+ public static void main (String [] args ) {
8+ // TODO Auto-genetorated method stub
9+
10+ System .out .println ("Assignment One: Full Name Salutation." );
11+
12+ Scanner reader = new Scanner (System .in );
13+
14+ String firstName ;
15+ System .out .println ("Enter your first name: " );
16+ firstName = reader .next ();
17+
18+ String lastName ;
19+ System .out .println ("Enter your family name: " );
20+ lastName = reader .next ();
21+
22+ String salutation ;
23+ System .out .println ("What salutation should be used?" );
24+ salutation = reader .next ();
25+
26+ String fullName ;
27+ fullName = salutation + " " +firstName + " " + lastName ;
28+
29+ System .out .println ("Your full name is: " + fullName );
30+
31+ }
32+
33+ }
You can’t perform that action at this time.
0 commit comments