JAVA lb-4 fixes
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 24 KiB |
Binary file not shown.
Before Width: | Height: | Size: 69 KiB |
Binary file not shown.
Before Width: | Height: | Size: 23 KiB |
Binary file not shown.
Before Width: | Height: | Size: 33 KiB |
@ -34,7 +34,9 @@ public class Part1 {
|
|||||||
|
|
||||||
if (input.equalsIgnoreCase("stop")) {
|
if (input.equalsIgnoreCase("stop")) {
|
||||||
break;
|
break;
|
||||||
} else if (input.equals("Latn")) {
|
}
|
||||||
|
|
||||||
|
if (input.equals("Latn")) {
|
||||||
result = extractWords(fileContent, LATN_PATTERN);
|
result = extractWords(fileContent, LATN_PATTERN);
|
||||||
} else if (input.equals("Cyrl")) {
|
} else if (input.equals("Cyrl")) {
|
||||||
result = extractWords(fileContent, CYRL_PATTERN);
|
result = extractWords(fileContent, CYRL_PATTERN);
|
||||||
|
@ -14,11 +14,13 @@ public class Part2 {
|
|||||||
|
|
||||||
InputStream stdin = System.in;
|
InputStream stdin = System.in;
|
||||||
|
|
||||||
|
try {
|
||||||
System.setIn(new ByteArrayInputStream(symin.getBytes(StandardCharsets.UTF_8)));
|
System.setIn(new ByteArrayInputStream(symin.getBytes(StandardCharsets.UTF_8)));
|
||||||
|
|
||||||
WordContainer.main(args);
|
WordContainer.main(args);
|
||||||
|
} finally {
|
||||||
System.setIn(stdin);
|
System.setIn(stdin);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -25,6 +25,5 @@ public class Part3 {
|
|||||||
ResourceBundle bundle = ResourceBundle.getBundle(BASE_NAME, locale);
|
ResourceBundle bundle = ResourceBundle.getBundle(BASE_NAME, locale);
|
||||||
System.out.println(bundle.getString(parts[0]));
|
System.out.println(bundle.getString(parts[0]));
|
||||||
}
|
}
|
||||||
scanner.close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user