我的java学习路之I/O流学习应用查找文件
来源:互联网 发布:郑爽 不吃饭知乎 编辑:程序博客网 时间:2024/09/21 06:34
//这是一个文件查看器DaKaiWenJianJia
public class DaKaiWenJianJia{
public static void main(String[] args) throws Exception{
JFileChooser filechooser = new JFileChooser();
if(filechooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION){
java.io.File file = filechooser.getSelectedFile();
Scanner input = new Scanner(file);
while(input.hasNext()){
System.out.println(input.nextLine());
}
input.close();
}else{
System.out.println("没有找到文件夹!");
}
}
}
//new 一个JFileChooser文件选择器
0 0
- 我的java学习路之I/O流学习应用查找文件
- 我的java学习路之I/O流
- java学习之I/O流
- java学习之i/o
- Java学习之路0723(九)(I/O流、File文件类)
- android学习之路---java部分 I/O流
- JAVA I/O流 学习
- JAVA I/O流 学习
- JAVA I/O流学习
- Linux学习之文件I/O操作
- 学习笔记之文件与I/O
- Qt学习之十七:文件I/O
- Python学习之路---Python文件I/O
- javaee学习日记之java基础之I/O流
- UNIX环境编程学习笔记—文件I/O之标准I/O流
- Java I/O 学习
- java I/O学习
- I/O系统之Java学习总结
- Buy the souvenirs(方案数+01背包)
- python 3.x 不再支持MySQLdb 模块
- 最少拦截系统
- 2017阿里后台开发工程师面试经验分享之一面
- [LeetCode] Counting Bits 计算二进制表示法中1的位数
- 我的java学习路之I/O流学习应用查找文件
- 使用python链接wamp或者xamp中的数据库
- 66. Plus One
- Android Studio 的SDK Manager
- python语法小知识
- Sublime Text 3 快捷键
- BootStrap学习笔记(二):关于分页组件中<a>标签disable后还是可以点击的问题
- Balanced Binary Tree
- AndroidN 中vulkan 的支持