Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By Norm

Thread: how to print quotations in java

  1. #1
    noobplus's Avatar
    noobplus is offline Senior Member
    Join Date
    Feb 2012
    Location
    chennai,south of India(south east of asia)
    Posts
    232
    Rep Power
    3

    Unhappy how to print quotations in java

    Hi,
    I really really need to print quotations and store it into a text file for further use..

    My output text file should be like this
    Java Code:
    "ReadPlatInstance.xArray[TotalLineCount/4]" "zz[j]"
    (the two variables are double-values
    the sample numbers are..
    "0.15844" "-93.92101412065836"
    "0.15844" "-2153.8147981553"


    my code is
    Java Code:
    file_out.write(ReadPlatInstance.xArray[TotalLineCount/4]+"\t"+zz[j]+"\n");
    my current output sample is..
    0.15844 -93.92101412065836
    0.15844 -2153.8147981553

    when I tried this code, it showed errors in java..
    Java Code:
    file_out.write("""+ReadPlatInstance.xArray[TotalLineCount/4]+"""+"\t"+"""+zz[j]+"""+"\n");
    How do I insert double quotes into the text file

    regards
    dhilip

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,556
    Rep Power
    23

    Default Re: how to print quotations in java

    How do I insert double quotes into the text file
    Use the escape character: \"
    noobplus likes this.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    noobplus's Avatar
    noobplus is offline Senior Member
    Join Date
    Feb 2012
    Location
    chennai,south of India(south east of asia)
    Posts
    232
    Rep Power
    3

Similar Threads

  1. Quotations Syntax Help
    By loopsnhoops in forum New To Java
    Replies: 2
    Last Post: 06-12-2011, 07:44 AM
  2. Print without dialog from web with java
    By javaprinter in forum Advanced Java
    Replies: 0
    Last Post: 01-19-2011, 09:06 AM
  3. How to print this in java?
    By yaseen in forum New To Java
    Replies: 20
    Last Post: 05-28-2010, 02:24 PM
  4. Print the text file and print preview them
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-22-2008, 11:04 PM
  5. print .doc in java
    By Alan in forum Advanced Java
    Replies: 1
    Last Post: 05-17-2007, 04:05 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
  •