Results 1 to 5 of 5
  1. #1
    psmhelp is offline Member
    Join Date
    Apr 2009
    Posts
    2
    Rep Power
    0

    Default Facing issue in printing user like "ab\\cd"

    Hello Friends,

    I have a application in C which adds the user "ab\\cd" and can read through client written in C. However while reading the user through java it gives me ab\\\cd.( Note the three \\\ instead two.) because of which my application is throwing error. How these escape sequence is handled to print/ read the value "ab\\cd".

    Thanks in advance.

  2. #2
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    450
    Rep Power
    7

    Default

    Did you use System.out.format() method for your problem?
    Mak
    (Living @ Virtual World)

  3. #3
    psmhelp is offline Member
    Join Date
    Apr 2009
    Posts
    2
    Rep Power
    0

    Default

    Sorry I am totally new on this. can you put a sample code for my referrance.
    Thanks in advance

  4. #4
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Location
    Hong Kong
    Posts
    473
    Rep Power
    7

  5. #5
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    450
    Rep Power
    7

    Default

    You may use the way said by mtyoung.
    To use system.out.format(),first learn about this function.
    Then start to write code.
    Mak
    (Living @ Virtual World)

Similar Threads

  1. Java, Military Format using "/" and "%" Operator!!
    By sk8rsam77 in forum New To Java
    Replies: 11
    Last Post: 02-26-2010, 04:03 AM
  2. Replies: 2
    Last Post: 01-24-2009, 07:56 PM
  3. Can't get my "if" statement to read user input
    By daletron3030 in forum New To Java
    Replies: 7
    Last Post: 01-16-2009, 06:24 AM
  4. Replies: 1
    Last Post: 10-20-2008, 08:35 AM
  5. printing an "E" out of asterisks via strings
    By hokieman07 in forum New To Java
    Replies: 1
    Last Post: 04-08-2008, 06:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •