Skip to content

Instantly share code, notes, and snippets.

@udacityandroid
Created May 25, 2015 21:46
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • Save udacityandroid/aebbe8df6932e9c1c9bf to your computer and use it in GitHub Desktop.
Save udacityandroid/aebbe8df6932e9c1c9bf to your computer and use it in GitHub Desktop.
Android Development for Beginners : Practice Set 2 Email Directory Example
String firstName = "Lyla";
String lastName = "Fujiwara";
String contactInfo = firstName + " " + lastName;
contactInfo = "<" + lastName + "." + firstName + "@justjava.com>";
display(contactInfo);
@Darney8512
Copy link

Maybe
String firstName = "Lyla";
String lastName = "Fujiwara";
String fullName = firstName + " " + lastName;
String contactInfo = "<" + lastName + "." + firstName + "@justjava.com>";
display(fullName + contactInfo);

@MarvUkazu
Copy link

This worked for me :

    String firstName = "Lyla ";  
    String lastName = "Fujiwara";
    String contactInfo = firstName +  lastName +  " <" + lastName + "." + firstName + "@justjava.com>";
    display(contactInfo);
  • I merged the 3rd line with the 4th line and removed the double quotes in the third line
  • I also added a space to the string of the first name, to create a space between the first and last name

Screenshot 2021-02-06 at 7 58 41 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment