Our website loads in split second powered by Schema Theme. Thanks to MyThemeShop

File Path – Constructing file path in Java

Often we read /write files from particular directory. We need to construct a file path, where we want to create a file or read files from that directory. Directory file path will be separated with back slash (\) or forward slash (/), these will be specific to operating system (windows, Linux / Unix based). For writing common logic, we use File.separator to get the forward slash (/) or back slash based on the operating system where we are running program.

File Path