public static void main(String[] args) throws IOException { // TODO Auto-generated method stub String str1="My Name is Murali and he is good boy"; File f=new File("/Users/muralic/Documents/workspace/Murali.txt"); f.createNewFile(); //File is getting created fine.
//FileWriter fw=new FileWriter(f.getAbsolutePath()); FileWriter fw=new FileWriter("/Users/muralic/Documents/workspace/Murali.txt"); BufferedWriter out=new BufferedWriter(fw); out.write(str1); //unable to write into the file and also there is warning in line 18,