PrintWriter输出到文件是乱码,怎么修改
import java.io.*; import java.util.*; public class Digital { public static void main(String[] args){ Random a = new Random(); try{ PrintWriter pw = new PrintWriter("E:digital.txt"); for(int i=0;i<50;i++){ for(int j=0;j<10;j++){ pw.write(a.nextInt(51)); pw.write(" "); } pw.write("\r\n"); } pw.close(); System.out.println("perfect"); }catch(Exception ex){ System.out.println("Exception"); } } }