Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to create a string with a slash in it.

843789Jun 8 2009 — edited Jun 8 2009
inputFile = String.valueOf("\saves\" + jcomp9.getText() + "\file.txt");
I am trying to use a string as a filepath. I get error messages because of the slashes. What should I do?

Thanks
-Jason
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 6 2009
Added on Jun 8 2009
2 comments
151 views