
Dear Sir, Could you send me the java codings for BOOK BANK.Its very urgent, please

Hi Friend,
Try the following code:
import java.io.*;
import java.util.*;
public class BookBank{
public static void main(String[]args)throws Exception{
File f=new File("C:/books.txt");
BufferedWriter bw=new BufferedWriter(new FileWriter(f,true));
Book b=new Book();
Scanner input=new Scanner(System.in);
System.out.println("Book ID: ");
String id=input.nextLine();
System.out.println("Title: ");
String title=input.nextLine();
System.out.println("Author: ");
String author=input.nextLine();
System.out.println("Price: ");
double price=input.nextDouble();
bw.write(id+" "+title+" "+author+" "+Double.toString(price));
bw.newLine();
bw.close();
BufferedReader br=new BufferedReader(new FileReader(f));
String line="";
ArrayList list = new ArrayList();
while((line = br.readLine()) != null){
list.add(line);
}
Iterator itr;
for (itr = list.iterator(); itr.hasNext();) {
String str = itr.next().toString();
String[] splitSt = str.split(" ");
String ide = "", tit = "",aut="",p="";
for (int i = 0; i < splitSt.length; i++) {
ide = splitSt[0];
tit = splitSt[1];
aut = splitSt[2];
p = splitSt[3];
}
System.out.println(ide+" "+tit+" "+aut+" "+p);
}
}
}
Hope that it will be helpful for you.
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.