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
Зарегистрируйся сейчас
или Подпишись на будущие тесты