Can someone help me about my system. Im having trouble about my code. I cant figure out how it works. Lets see. Soo its about File class. How am i be able to compare string to notepad data. I've tried this code:
While(inFile.hasNext()){
Record = inFile.hasNextLin();
If(inFile.hasNext()){
inFile.nextLine();
If(id.equals(inFile.next()){
System.out.print(record);
}
Else{
Store.add(record);
}
}
}
My problem is, the user should enter an existing ID. And when it matches to the ID from the notepad, it will be deleted ..
Notepad information:
1#Zsannen Smile#First Year#
2#Number Sign#Second Year#
*the delimiter is "#"
*if i enter 1 for the ID, all the information of number 1 will be deleted.
Thank You for the future help.
Looking forward for someone who will help me. i can explain more about my problem if you insisted.