I have to check a text doc whether it exists or not and then i have to replace a letter in that say a to o. I have done the first part how to replace char
class FDExists{
public static void main(String args[]){
File file=new File("trial.java");
boolean exists = file.exists();
if (!exists) {
System.out.println("the file or directory you are searching does not exist : " + exists);
}else{
System.out.println("the file or directory you are searching does exist : " + exists);
}
}
}
This i have done