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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -