File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Assing the value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Assing the value" Watch "Assing the value" New topic

Assing the value

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 303

I want to put the following path in a variable

like String str=C:\Documents and Settings\Administrator\Desktop

But its showing error.

Please help me how to solve this problem

Henry Wong

Joined: Sep 28, 2004
Posts: 20524

It's probably a good idea to use quotes around a string literal... And escape the backslashes too...


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Lucas Franceschi
Ranch Hand

Joined: Nov 10, 2008
Posts: 106

why dont you post us your error?

but, i probably think that its exactly what henry said...

try doing this

should work

Lucas Franceschi
Software Developer for SGI Sistemas,
Lucas Franceschi
Ranch Hand

Joined: Nov 10, 2008
Posts: 106

oh, and you probably mean assign, when you say assing, right?

(UPD: i'm starting to go crazy, i'm typing non-sense things.)
I agree. Here's the link:
subject: Assing the value
jQuery in Action, 3rd edition