ABCs

  • 10
  • Locked
The first parameter of the main method is a file name. Count the letters in the file. Display the number of letters. Close the streams.
You can't complete this task, because you're not signed in.
Comments (6)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Justin Smith
Level 38 , Greenfield, USA, United States
1 October 2021, 02:29
This one was frustrating for a while because I didn't know which byte values are letters, and Google was utterly useless (searched for an hour). So if you're stuck with that part, you can first create a txt file that contains a-z and A-Z (no spaces, all one line, very important), then have the program read that file and print all the byte values. That will give a range of values which then you can use writing the code for the task to check the read values against. It worked for me and I passed validation this way.
Gellert Varga
Level 23 , Szekesfehervar, Hungary
3 November 2021, 20:58
A clever solution! But maybe it will help you in the future, i like them: ASCII codes in a table: https://theasciicode.com.ar/ Unicode characters rapid tables: https://www.rapidtables.com/code/text/unicode-characters.html Unicode character searcher (to find anything): https://www.compart.com/en/unicode/U+672C
matemate123
Level 32 , Kraków, Poland
23 January, 19:13
I think use BufferRider and ASCII values it's the simplest and fastes way to do it
wissam
Level 24 , Jaramana, Syrian Arab Republic
16 February 2021, 20:50
Character.isLetter(currentChar) can also do the job :)
Switch/Cypher
Level 25 , Bexleyheath, United Kingdom
5 October 2020, 18:56
'You need to count ONLY the letters of the English Alphabet in the file (both Upper and Lower case) ignoring any ascii values denoting non-letter elements' Hope that's helpful to anyone.
Henrique
Level 41 , São Paulo, Brazil
18 June 2020, 21:10
???????????????????????????????????????????????????????