+ 17
How can i achieve this?
Guys I created a login Form (GUI) in java and I wanted the user to be verified from a file created by a file writer.
6 Réponses
+ 7
You can use the Scanner class. Pass in your File object as the Scanner object's constructor argument and you're good to go.
e.g.
Scanner fileRead = new Scanner(objFile);
System.out.println(fileRead.nextLine()); //Reads and outputs next line in your file
so maybe you can go like:
String username = fileRead.nextLine();
0
game
0
sas
0
sun
0
action
0
agss