I'm retrieving the file name from a function and that function returns me the
string and now I can't change this.
String fileName="C:\jdk1.2\hello.java"
Now next with this file Name I'm making a file object
File f=new File(fileName);
FileInputStream in=new FileInputStream(f);
but this gives me error..that it doesn't found the specified the file given...
so this means I must give the separator as C:\\jdk1.2\hello.java
but I can't change the value returned to me by the function...
So this means that I have to make a function replace which converts '\' to '\\'
String newfileName=replace(fileName);
so please can anybody tell me how to write this funcion? Actually I can't use replace fn. of String class, as it says that '\' is invalid escape character...u try it and compile the result and tell me
thanx in advance for the favourable response