Answer to Question #294361 in Java | JSP | JSF for meenu

Question #294361

How to do login of username and password from file handling.


1
Expert's answer
2022-02-06T12:31:04-0500
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {
        try (BufferedReader fileIn = new BufferedReader(new InputStreamReader(new FileInputStream("data.txt")))) {
            String[] data = fileIn.readLine().split(";");
            String login = data[0];
            String password = data[1];
        } catch (Exception e) {
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS