Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * DIRECTIONS TO STRINGPROGPRACTICE 2
- *
- * declare & initialize & print strings
- * output: skips lines between each one
- * 1. first name
- * 2. middle name
- * 3. last name
- * 4. full name by combining first middle last name,
- * 5 counting full name using .length
- * 6. part name taken from full name using substring
- * 7. print first name and then the next line take away a character one
- * a time for each line- using counted loop
- * 8. declare & initialize int variable
- * 9. begin with 1 and print up to the number 5 on the same line.
- * 10. declare, initialize, print first middle last name on
- * separate lines in uppercase using .toUpperCase
- * 11. using if else and using equals are firstName and firstNameCaps
- * the same print if they are the same or different.
- * 12. using if else and using equalsIgnoreCase- are middleName
- * and middleNameCaps the same. print if they are the same
- * or different
- * 13. using if else and using equals- are lastName and lastNameCaps
- * the same. print if they are the same or different
- OUTPUT WILL LOOK LIKE:
- My first name is Samantha
- My middle name is Grace
- My last name is Seibert
- //purple
- My full name is Samantha Grace Seibert
- My name is 22 characters long
- partName is Samantha Grace
- Samantha Grace Seibert
- amantha Grace Seibert
- mantha Grace Seibert
- antha Grace Seibert
- ntha Grace Seibert
- tha Grace Seibert
- ha Grace Seibert
- a Grace Seibert
- Grace Seibert
- Grace Seibert
- race Seibert
- ace Seibert
- ce Seibert
- e Seibert
- Seibert
- Seibert
- eibert
- ibert
- bert
- ert
- rt
- t
- 1 2 3 4 5
- SAMANTHA
- GRACE
- SEIBERT
- The first names are not the same.
- The middle names are the same.
- The last names are the same.
- *
- *
- *
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement