Home > Back-end >  The great spirit to solve
The great spirit to solve

Time:12-04

CodePudding user response:

are you need to write all the code for you

CodePudding user response:

reference 1/f, I romance and extreme response:
are you need to help you write all the code

Right, in trouble

CodePudding user response:

C major or what

CodePudding user response:

C or Java

CodePudding user response:

The File File=new File (" lyingFileRead. TXT ");
//input data
FileOutputStream out=new FileOutputStream (file);
String STR="Joe Smith, 123456;"
Out. Write (STR) getBytes ());
out.close();
//read the data
FileInputStream in=new FileInputStream (file);
InputStreamReader reader=new InputStreamReader (in);
BufferedReader br=new BufferedReader (reader);
The String line="";
If ((line=br. ReadLine ())!=null) {
System. The out. Print (" input: ");
Scanner input=new Scanner(System.in);
String data=(https://bbs.csdn.net/topics/input.nextLine);
//split data
String username=line. The split () ", "[0];
String password=line. The split () ", "[1];
String data_name=data. The split (" ") [0];
String data_password=data. The split (" ") [1];
If (username. Equals (data_name) & amp; & Password. Equals (data_password)) {
System. The out. Println (" welcome to login ");
} else {
System. The out. Println (" user name or password error ");
}
Input. The close ();
}
  • Related