5 years ago (2015-04-20)  Algorithm language |   First to comment  3 
post score 0 times, average 0.0
[Slideup] Catalog

Although JAVA provides a variety of input and output stream methods and methods, it is not convenient for non-character data.Therefore, for the input and output of data such as int, it can only be “Eight Immortals Crossing the Sea, each showing supernatural power”.Here's a small example of writing and reading data to a file. Let's talk about the author's way. Hopefully it will help a beginner.

Problem Description:

The programming program generates 100 random numbers between 1 and 100 and writes them to a file, then reads them out of the file, sorts them, and writes them to another file.

Code:

 

 

This article has been printed on copyright and is protected by copyright laws. It must not be reproduced without permission.If you need to reprint, please contact the author or visit the copyright to obtain the authorization. If you feel that this article is useful to you, you can click the "Sponsoring Author" below to call the author!

Reprinted Note Source: Baiyuan's Blog>>https://wangbaiyuan.cn/en/java-inputoutput-streams-at-a-glance-2-2.html

About

Post comment

Style

No Comment

登录

Forget password?

您也可以使用第三方帐号快捷登录

切换登录

注册

TW