What will be printed out after the following code is compiled and executed?

String d = "beekeeper";
d.substring(1,7);
d = "w" + d;
d.insert(3, "bee");
System.out.println(d);
Explanation
The String class is immutable and doesn't contain an insert() method
StringBuffer and StringBuilder classes significantly differ from String class - their content may be modified by append, insert and delete methods.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з Java
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести