How to do login of username and password from file handling.
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) {
}
}
}
Comments
Leave a comment