• 12
  • Locked
Read 2 file names from the console. The first file contains text. Read the contents of the first file, and remove all punctuation marks, including newline characters. Then output the result to the second file. Close the streams.
You can't complete this task, because you're not signed in.
Comments (5)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Angus McDonald
Level 23 , London, United Kingdom
30 May 2020, 16:19
This is a really poorly worded task I feel. Punctuation marks = [!"\#$%&'()*+,\-./:;<=>?@\[\\\]^_‘{|}~] However the task has us pass by removing other characters all together.
Level 25 , Bexleyheath, United Kingdom
10 October 2020, 11:03
String.replaceAll ("\\p{Punct}", "");
is what you want here.
Level 37
30 May 2020, 14:20
PRO TIP After 14 attempts I discover that you are not to class a space as a punctuation mark.
Oleksii Chernysh
Level 27 , Dnipro, Ukraine
3 December 2019, 16:52
Spent some time trying to understand the reason of validation timeout. It doesn't like
while ((b = input.read()) != -1)
and works ok with ready()
while (input.ready())
Does anybody know why?
Level 41
10 December 2019, 12:15
Testing features) It will be fixed soon, thanks.