|ITEC 120 LAB 6||Back to Lab index page|
You will write Java program that will call a bunch of different String methods.
First, your program will ask the user to input a String.
Next, your program will output the original string (surrounded by "s), the length of the string, the first character in the string, the last character in the string, the string in all lowercase letters, the string in all uppercase letters, the original string with all of the first characters replaced by the last character.
For this lab, try to make your output look exactly as shown (using tabs and blank lines) so that it is readable.Sample run:
Please type a string:
|User inputs:||all I wanna do is code Java!|
The first character is: a
All lowercase: all
i wanna do is code java!
Replacing all the as with !s
Once you have your program working, show your lab to the Peer Instructor to be checked off. You'll run your program a couple times for the Peer Instructor.