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

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -