Question: 1. What output is produced by the following code fragment? String greetingHow do you do? system.out.println (greeting.length)); System.out.println (greeting.charAt (2)) System.out.println (greeting.substring (6)) int position

 1. What output is produced by the following code fragment? String

1. What output is produced by the following code fragment? String greeting"How do you do?" system.out.println (greeting.length)); System.out.println (greeting.charAt (2)) System.out.println (greeting.substring (6)) int position -greeting.indexof ("you") System.out.println ("The word \"you\ " starts at index" +position) system.out.println ("abc def") System.out.println ("abe\ def") String ml, m2, m3; ml-"Quest for the Holy Grail"; m2-ml.toLowerCase() system.out.println (m3.replace('h

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!