From c5807472c30485c218a41b7645b43baeeb29704f Mon Sep 17 00:00:00 2001 From: Martin Klose Date: Fri, 25 Nov 2011 19:32:41 +0100 Subject: [PATCH] remove "\n" and cast char to string --- java/string_calculator/src/main/java/StringCalculator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/string_calculator/src/main/java/StringCalculator.java b/java/string_calculator/src/main/java/StringCalculator.java index cf46fb8..21a4d39 100644 --- a/java/string_calculator/src/main/java/StringCalculator.java +++ b/java/string_calculator/src/main/java/StringCalculator.java @@ -14,7 +14,7 @@ private String[] extractNumbers(String s) { } private String extractCustomSeparator(String s) { - return "\n" + s.charAt(2); + return Character.toString(s.charAt(2)); } private String removeSeparatorDefinition(String s) {