Chapter 10: Problem 23
You wish to change a specific character in a StringBuilder object. What method do you use?
Chapter 10: Problem 23
You wish to change a specific character in a StringBuilder object. What method do you use?
All the tools & learning materials you need for study success - in one app.
Get started for freeIn a program that makes lots of changes to strings, would it be more efficient to use String objects or StringBuilder objects? Why?
What is the difference between the getchars and substring methods?
What is the difference between the indexof and lastIndexof methods?
Look at the following string: "dogscat(@birdssquirrel" Write code using the String class's split method that can be used to extract the following tokens from the string: \(d o g, \quad\) cat, \(\quad\) bird, and squirrel. Write the declaration of a StringTokenizer object that can be used to extract the same tokens from the string.
What will the following code display? char var \(=\) 's' System.out.println (Character.toUppercase (var))
What do you think about this solution?
We value your feedback to improve our textbook solutions.