• Post Reply Bookmark Topic Watch Topic
  • New Topic

File.Separator  RSS feed

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following question is from K&B from unit-6 .
I am not able to understand its answer

Here's the code

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
File.separator is a " system-dependent default name-separator character ". On a windows environment, it will be '\', on a linux environment, it will be '/'.

Same for the file.pathSeparator. On a windows environment it will be ';' and on a linux environment I think it's a ':'
You obviously want your source file dynamically enough to work well on other environments without problems.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!