Which of the following creates a String object with the value "toy"?
Consider the statement below:
StringBuilder sb1 = new StringBuilder("a toyota");
a. String res = sb1.subString(2, 5);
b. char dest[] = new char[sb1.length()];
sb1.getChars(2, 5, dest, 0);
String res = new String(dest);
c. char dest[] = new char[sb1.length];
dest = sb1.getChars(2, 5);
String res = new String(dest);
d. char dest[] = new char[sb1.length()];
dest = sb1.getChars(0, 3);
String res = new String(dest);
b. char dest[];
sb1.getChars(2, 4, dest, 0);
String res = new String(dest);
You might also like to view...
A lambda expression begins with a parameter list and is followed by the ________ lambda operator and an expression that represents the lambda’s body.
a) -> b) => c) :^) d) =)
Which of the following is the MAXIMUM speed limit on RAMBUS?
A. 266MHz B. 533MHz C. 667MHz D. 800MHz
What should proxy server administrators consider when configuring proxy servers for various services?
What will be an ideal response?
What is the purpose of the System Setup program?
A) Assign resources to all devices inside the computer. B) Reprogram the flash BIOS. C) Set system parameters. D) Configure Windows users.