Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8346511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:02:36+00:00 2026-06-09T07:02:36+00:00

100% of the Java work I do is on Android. When constructing file paths,

  • 0

100% of the Java work I do is on Android. When constructing file paths, I always make sure to use File.pathSeparator File.separatorChar instead of “/”.

What determines the value of File.pathSeperator? Are there any Android devices where File.pathSeparator File.separatorChar will not be “/” ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:02:38+00:00Added an answer on June 9, 2026 at 7:02 am

    According to the source code of File.java, pathSeparator is pulled from the char System.getProperty("path.separator", ":").charAt(0). separator, on the other hand, comes from System.getProperty("file.separator", "/").charAt(0).

    Because Android is Linux-based, it should always be /. However, I have seen glitches where : has appeared instead (Motorola Droid; see bug report), by using the default value above.

    When I code, I always use /… to be honest, I don’t think it’s necessary to reference the File class (this would mostly be for non-Android work). It’s just best to stick to /, I think.

    Additionally, according to this answer (pertains to Java, not just Android), / can safely be used on all Java platforms, and it will figure out what it needs to use internally.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my gridview.java class public class TextGridActivity extends Activity { String[] _cataId=new String[100]
I have the below java code: List<SomePojo> list = new ArrayList<SomePojo>(); //add 100 SomePojo
I'm not 100% sure if the problem is with openTK but it is the
I'm not 100% sure how I should word this question but I'll try my
i am teaching myself java and i work through the exercises in Thinking in
Our Java application has about 100 classes mapped to a database (SQL Server or
With solid C++ in my back some Java concepts are not 100% clear. List<SomeInterface>
I have some image processing Java code in Android that acts upon two large
I like to use a PPTP VPN in the Android emulator. My VPN provider
I'm trying to use the Daring Fireball Regular Expression for matching URLs in Java,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.