what's the difference between
fis =new FileInputStream(path+File.separator+"src"+File.separator+"main"+File.separator+"java"+File.separator+"com"+File.separator+"resources"+File.separator+"config.properties");
fis =new FileInputStream(path+"/src/main/java/com/resources/config.properties");
fis =new FileInputStream(path+"\\src\\main\\java\\com\\resources\\config.properties");
My teacher told me to use File.separator as it's platform independent but on the internet I read '/'would work on Macs and Windows. I tried '/'on windows and it works. if '/' works on Macs and Windows why do we need to use File.separator?