- 博客(2)
- 收藏
- 关注
原创 IO流读取文件内容
public static void main(String[] args) throws IOException { // 先创建流对象和文件进行关联 InputStream in = new FileInputStream("D:\\abc.txt"); // 定义数组,用来存储从底层读取的多个字节数据,一般都是1024的整数倍 byte[] buf = new byte[1024]; // 定义变量,用来记录到底从底层读取了多个字节数据 int len = 0; .
2021-12-10 13:58:53
1097
原创 去重的几种方法
1.list方法: public class Demo4 { public static String notRepest2(String str){ ArrayList list = new ArrayList(); String newsString=""; for (int i = 0; i < str.length(); i++) { if (list.contains(str.charAt(i))==false) { list.add(str.charAt(i
2021-12-08 11:09:02
3486
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人