Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void saveAK() {
- JFileChooser chooser=new JFileChooser();
- if(Chooser.showsaveDialog(this)==JFile Choose.APPROVE_OPTION)
- {
- try{
- FileWriter fw=new FileWriter(chooser.getSelectedFile().getAbsolutePath());
- PrintWriter pw= new FileWriter(fw);
- for (book.list){
- string[]parts=x.getAuthor().split(" ");
- if(parts[1].charAt(0)>='A' && parts[1].charAt(0)<= 'K')
- pw.println(""+x);
- }
- fw.close();
- }catch (IOException ex){}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement