Question: 1) Assuming you have the following declarations: (10 points) String name - John James Harrison, MD; What would each of the following sets statements do?

 1) Assuming you have the following declarations: (10 points) String name

1) Assuming you have the following declarations: (10 points) String name - "John James Harrison, MD"; What would each of the following sets statements do? a. System.out.printin( name.charAt( 15 )); b. System.out.printin( name.substring( name.lastindexOf(): c. int pos = name:indexOf( "Th System.out.printin( name.substringl pos, name.indexOf(', pos+1))) d. int pos name.length)/2; System.out.println( name.charAt(0) ++ name.charAt(pos) +name.charAt( name.length()-1); e. String newName-name.replace('a', '&'); System.out.printin( newName)

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!