This test is not completed, the beginning will not read and write files, after learning the file can be normal read and write, I write a statistical file of the frequency of the letter
Statistics uppercase, lowercase letter frequency The way I used it.
/* Lowercase Letter */
SYSTEM.OUT.PRINTLN ("There are lowercase letters in the halibote.txt:");
for (Char ch= ' a ';ch< ' z '; ch++)
{
count=0;//counter
for (int i=0;i<chs.length;i++)
{
if (ch==chs[i]) count++;
}
if (count!=0)
{
System.out.println (ch+ "has" +count+ ");
}
}
/* Capital Letter */
System.out.println ("Halibote.txt in capital letters:");
for (char ch= ' A ';ch< ' Z '; ch++)
{
count=0;
for (int i=0;i<chs.length;i++)
{
if (ch==chs[i]) count++;
}
if (count!=0)
{
System.out.println (ch+ "has" +count+ ");
}
}
In code to express, but the most critical is not to transfer, from the TXT document converted to char type, loaded to read only the first word, not to the back of the statistics, the problem is here.
Go ahead and write again tomorrow.
Statistical word Frequency