Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in path separator

 
Sekhar Choudary
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Can any one explain differences between
1)pathSeparator
2)pathSeparatorChar,

3)separator
4)separatorChar.

Thanks .
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All four are seems to be the same thing in Java , either unix OS "/" or windows OS "\" , called Path Separator, and they are represented by string !

Where you find those words !
 
Nikos Pougounias
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, pathSeparator is used to separate the entries in path. In Windows it's ; and in Unix systems it's :.

For example, see how these entries are separated



pathSeparator is a String and pathSeparatorChar is a char. It's convenient to have both available.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic