Java FileOutputStream Default Creation Path -
let's have below code:
string filename = "name.txt"; fileoutputstream fileout = new fileoutputstream(filename); wb.write(fileout);
this way, file created under bin folder of project.
however, if specific filename @ whole path:
string filename = "c:/temp/name.txt";
this file created @ c:\temp folder.
am correct? , why happen, how fileoutputstream work?
if don't specify absolute path, e.g. if specify file name, program or operating system somehow needs figure out, find file. reason running program has working directory. happens folder start from, default.
Comments
Post a Comment