课堂测试-文本操作

package test3;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;

public class Frequency {
	public static void main(String[] args)throws IOException
	{
	    List list=new ArrayList<>();
	    DecimalFormat df=new DecimalFormat("######0.00");  
	     FileInputStream fip = new FileInputStream("C:\\Users\\hp\\Desktop\\信1805-3 班 20183791 马苗苗\\test3\\src\\test3\\file");
	    InputStreamReader reader = new InputStreamReader(fip, "gbk");
	    StringBuffer sb = new StringBuffer();
	    while (reader.ready()) {
	        sb.append((char) reader.read());
	    }
	    //System.out.println(sb.toString());
	    reader.close();
	    fip.close();
	    
	    int i;
	    String A=sb.toString();
	    String M="abcdefghijklmnopqrstuvwxyz";
	   String temp = "";
	    char NUM[]=new char[A.length()];
	    char Z[]=new char[26];
	    int X[]=new int[26];
	    int MAX=0;
	    Z=M.toCharArray();
	    for(int k=0;k<26;k++)
	    {
	        X[k]=0;
	    for(i=0;i=97&&c<=122))
	        c+=32;
	    return c;
	}

}

  

 

你可能感兴趣的:(课堂测试-文本操作)