import java.nio.charset.*;
import java.util.*;public class CharSetText
{
public static void main(String[] args) throws Exception
{
//找出系统的配置
Properties pps = System.getProperties();
pps.put("file.encoding","ISO-8859-13");
pps.list(System.out);
int data;
byte[] buf = new byte[100];
int i = 0;
while((data = System.in.read()) != '#')
{
buf[i] = (byte)data;
i++;
}
String str = new String(buf, 0, i);
System.out.println(str);
}
}
import java.util.*;public class CharSetText
{
public static void main(String[] args) throws Exception
{
//找出系统的配置
Properties pps = System.getProperties();
pps.put("file.encoding","ISO-8859-13");
pps.list(System.out);
int data;
byte[] buf = new byte[100];
int i = 0;
while((data = System.in.read()) != '#')
{
buf[i] = (byte)data;
i++;
}
String str = new String(buf, 0, i);
System.out.println(str);
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货