Skip to content

Commit 15bd177

Browse files
committed
refactor: 입력 구분자 매직넘버 상수화
1 parent a3438d7 commit 15bd177

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/io/suhan/lotto/view/InputView.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
public class InputView {
1111
private static final Scanner scanner = new Scanner(System.in);
12+
private static final String INPUT_DELIMITER = ",";
1213

1314
public static int getBalance() {
1415
System.out.println("구입할 금액을 입력해주세요.");
@@ -46,7 +47,7 @@ public static List<Set<Integer>> getManualNumbers(int count) {
4647
}
4748

4849
private static Set<Integer> parseNumbers(String input) {
49-
return Arrays.stream(input.split(","))
50+
return Arrays.stream(input.split(INPUT_DELIMITER))
5051
.map(Integer::parseInt)
5152
.collect(Collectors.toSet());
5253
}

0 commit comments

Comments
 (0)