How to use Java File separator,separatorChar

Directory separator using in Unix systems is forward slash (/) while in windows it is backward slash (\).
Due to this differences if we hard coded any of these slashes, it will not work on other environment and the program will not work in platform independent mode.