Question: JAVA Write a method called wackyStrings() with no parameters and no return values. Define a String variable called tongueTwister and initialize it with the value
JAVA Write a method called wackyStrings() with no parameters and no return values. Define a String variable called tongueTwister and initialize it with the value Peter Piper picked a peck of pickled peppers After printing the entire variable, print the following questions and their answers, each pair on a separate line, using only methods from the String class:
a.) Length of Tongue Twister: ___ (44)
b.) Name of Subject: ______ _______ (Peter Piper)
c.) Capitalize entire name of subject: _________ ________ (PETER PIPER)
d.) Location of first 3 Es: ____ ____ ____(1 3 9)
e.) Action Performed _________ (picked)
f.) Initials of Subject _ _ (PP)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
