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.
ABCs
- 10
Locked
Comments (6)
- Popular
- New
- Old
You must be signed in to leave a comment
Justin Smith
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.
0
Gellert Varga
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
0
matemate123
23 January, 19:13
I think use BufferRider and ASCII values it's the simplest and fastes way to do it
0
wissam
16 February 2021, 20:50
Character.isLetter(currentChar) can also do the job :)
0
Switch/Cypher
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.
+1
Henrique
18 June 2020, 21:10
???????????????????????????????????????????????????????
0