aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Doubt in path separator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Doubt in path separator" Watch "Doubt in path separator" New topic
Author

Doubt in path separator

Sekhar Choudary
Ranch Hand

Joined: May 03, 2008
Posts: 57
Hi ,

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

3)separator
4)separatorChar.

Thanks .
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

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 !


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Nikos Pougounias
Ranch Hand

Joined: Jan 16, 2008
Posts: 110
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.


Nikos' Java blog
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Doubt in path separator