This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Thanks for your reply Paul, well as you said, it does show the stack trace. But what I have understood is the following--
if you will observe f.getAbsolutePath(); this bit of code, stores the file path which includes \ this sign which is escape character! but when I replaced \ with / while running a program, then it runs properly. So, now I have a question that do I need to replace slashes every time I try to backup? If no then I'd request you to help me out with that. Also, teach me how to work with StackTrace please
On the other hand I think it's quite likely the reason is that \ is an escape character. But it would help considerably if you posted the actual code which throws the exception and not just some code which is sort of like that code. So how about if you do that?
This is the code I used and I didn't get any error..
Through \ is an escape character, here the variable store \\ . You can see when debugging..
But when you use System.out.println(path) it prints only \ as \\ refers "\". But don't think that the variable store only \...
I said that, if we write System.out.println(path) the path name will print as C:\myFolder\backUp.sql..
But actually path name is stored in the variable as C:\\myFolder\\backUp.sql.. We can see it when debugging the program.