@alisa.bahringer Вы можете использовать .replace() для замены точек на запятые.
1 2 3 4 5 6 7 8 9 10 |
class Main { public static void main(String[] args) throws Exception { String string = "In our garden you can see : trees. some animals. plants. and other"; string = string.replace(".", ","); System.out.println(string); // Вывод : In our garden you can see : trees, some animals, plants, and other } } |