Created
August 29, 2017 13:32
-
-
Save ihopeudie/c11a9e00b7ff0eebe5c2c2ba50391c26 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javarush.task.task18.task1816; | |
/* | |
Английские буквы javarush | |
*/ | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
public class Solution { | |
public static void main(String[] args) throws IOException { | |
FileInputStream iStream = new FileInputStream(args[0]); | |
byte[] array = new byte[iStream.available()]; | |
int counter = 0; | |
iStream.read(array); | |
for (byte element: array | |
) { | |
if ((element>='a') & (element<='z') | (element>='A') & (element <='Z')) counter++; | |
} | |
iStream.close(); | |
System.out.println(counter); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment