Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
シンプルな File ライター クラスを使用して、複数のユーザーのユーザー名パスワードなどを格納するデータ テキスト ファイルを作成したいと考え、作成しました。しかし、作成したファイルからそれらを検索、検索、使用するためにどのクラスを使用すればよいかわかりません。助けてください?
BufferedReader br = new BufferedReader(new FileReader(<your_file>)); String line; while ((line = br.readLine()) != null) { //process here } br.close();
これは、ファイルから読み取る標準的な方法です。while ループ内では、必要なことを行うことができます。
質問を指定すると、より多くのヘルプが可能になります