Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Java Programming Study Set 2
Quiz 7: Characters Strings and the Stringbuilder
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 61
Essay
StringBuilder greeting = new StringBuilder("Welcome"); Use the append() method to add the characters "home" to the end of the StringBuilder object created above.
Question 62
Essay
yourCounty = "Clark" yourCounty.startsWith("Cla") What value will be returned by the startsWith() method? Explain how the startsWith() method deals with case sensitivity.
Question 63
Essay
import javax.swing.JOptionPane; public class Practice { public static void main(String[] args) { String fullName; char firstLetter; ____ ____ } } Accepting a String from a user is common practice. Using the above code, write the statements to accept a String response from a user. Prompt the user with "Enter your name". Then use the charAt() method to extract the first character of the String .
Question 64
Essay
What is a wrapper and why would you use it?
Question 65
Essay
StringBuilder greeting = new StringBuilder("Day 1"); Using the above StringBuilder , create a setCharAt() method that will change the "1" to a "2" in the String "Day 1" . Explain how the setCharAt() method operates.