Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Main Memory Database Systems

Authors: Frans Faerber, Alfons Kemper, Per-Åke Alfons

1st Edition

1680833243, 978-1680833249

More Books

Students also viewed these Databases questions

Question

=+7. What are the components of a digital marketing plan?

Answered: 1 week ago