#21 Within the main method, write the code that will declar…
#21 Within the main method, write the code that will declare a String variable named word with the initial value of “beekeeper”, and will then print the location of the third occurrence of the letter ‘e’ in the word. The output message will say “The location of the third e in beekeeper is xxxx”. Your code replaces xxxx with the location of the third e in the word… be careful here. b is at location 0. Hint: Use a built-in String method. Note: hard coding the location will give you zero points for the problem. In main: public static void main(String args[]) { //declare your variable(s) here and initialize //find the location of the third ‘e’ //print that location }
Read Details