Question: Question 11: -- Consider the statements below: String a = JAVA: ; String b = How to ; String c = Program; Which of the

Question 11: -- Consider the statements below: String a = "JAVA: "; String b = "How to "; String c = "Program"; Which of the statements below will create the String r1 = "JAVA: How to Program"? String r1 = c.concat(b.concat(a)); String r1 = a.concat(b.concat(c)); String r1 = b.concat(c.concat(a)); String r1 = c.concat(c.concat(b)); Flag this Question

Question 12: -- Which of the following is not a method of class String? toUpperCase trim toCharacterArray All of the above are methods of class String Flag this Question

Question 13: -- StringBuilder objects can be used in place of String objects if ________. the string data is not constant the string data size may grow the programs frequently perform string concatenation All of the above. Flag this Question

Question 14: -- Given the following declaration: StringBuilder buf = new StringBuilder(); What is the capacity of buf? 0 10 16 20 Flag this Question

Question 15: -- Which of the following statements is true? The capacity of a StringBuilder is equal to its length The capacity of a StringBuilder cannot exceed its length. The length of a StringBuilder cannot exceed its capacity. Both a and b are true. Flag this Question

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!