How do you convert a Double back to a String?

I am trying to convert a type Double back to a string so i can display the information using a g.drawstring in my applet.
Thanks

When i put in the value of method i still get this message
.java:111: cannot resolve symbol
symbol : method drawString (double,int,int)
location: class java.awt.Graphics
          g.drawString(M,100,40);
^
1 error
Am i putting the code in the wrong area? here is part of the code where i put it in
//output using awt
String.valueOf(M);
     g.drawString("The Average for 7 random numbers",100,10);
     g.drawString("Minimum value:",5,25);
     g.drawString("Maximum value:",5,40);
     g.drawString("Mean value:",5,55);
     g.drawString(myMin,100,25);
          g.drawString(M,100,40);
g.drawString(myMean,100,55);
The value M is my value that i am processing in an array from this code ---
mean = sum / anArray.length;
          //for loop to calculate the max value
          for(int k = 0; k < anArray.length-1 ; k++) {
               M = anArray[k];
               if ( M > max) {
                    max = M;
Thanks

Similar Messages

  • How can I convert a double to string

    Hello,
    how can I convert a double value to a string value?
    Werner

    an other way: ;)
    double yourDouble;
    int intTmp;
    yourDouble = yourDouble * 100;
    yourDouble = yourDouble + 0.5;
    intTmp = yourDouble.intValue();
    yourDouble = intTmp;
    yourDouble = yourDouble / 100;you can write it some shorter...
    double yourDouble;
    int intTmp;
    yourDouble = yourDouble * 100 + 0.5;
    yourDouble = yourDouble.intValue() / 100;*100 moves the comma about two steps to the left.
    + 0.5 enables rounding!
    if your value is x.5 or larger you get x+1.?
    if its smaller than x.5 you get x.?
    by parsing the double value to an int the ? is cut.
    /100 moves the comma two steps back
    you get a double value with 2 decimals which is rounded.
    just my coins :)
    happy progging,
    Thof

  • How do i convert a double array (with spaces and tabs) to a string?

    Hi
    In our files, we have a mixture of spaces and tabs as a delimeter. How do I convert a double array into a string?
    Thank you.

    Not sure about the last part of your question.
    The Search and Replace pattern can be better than the simple Search and Replace string when you have to do complex searchs, such as detecting multiple spaces.
    Have a look at the attachment.
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    ReplaceSpaces.vi ‏27 KB

  • I changed from i iphone 5 back to a iphone 4.. now my itunes does not recognise that i have a iphone 4! how do i convert my last back up (on iphone 5) to my new iphone 4?

    i changed from i iphone 5 back to a iphone 4.. now my itunes does not recognise that i have a iphone 4! how do i convert my last back up (on iphone 5) to my new iphone 4?

    In your case you can only restore from a backup that has been created with the same iOS version. An iPhone 4 can only run 7.1.2, and, unless your iPhone 5 did not run the same version, you can't use a newer iOS backup of the 5 on the iPhone 4

  • How can I convert the variable expression stored as string back to variable expression

    How can I convert the variable expression stored as string back to variable expression?
    I am storing the expression enterd in the TSExpresssionEditControl as simple string and want to convert back to expression since I want to get the data type of that expression.

    pritam,
    I'm not sure what you're trying to do exactly. If you are trying to get the value of a variable and you only have the name of value in a string, then you can use Evaluate() to get its value. If you want the data type, my advise is to use the GetPropertyObject() API method and just pass in the loop up string. Then you'll have a handle to the data object and then proceed from there.
    Regards,
    Song D
    Application Engineer
    National Instrument
    Regards,
    Song Du
    Systems Software
    National Instruments R&D

  • How do you convert channels.dvb to channels.conf

    Title says is all. How do you convert the kaffeine file channels.dvb to a channels.conf file which can be used by mplayer.
    The winterhill transmitter in the UK is now totally digital, since the change over I've not been able to get BBC channels properly in mplayer. The receiver is a Freecom DVB-T USB. I've manually edited the uk-WinterHill file with the transmitter info to update it and used it to create a channels.conf file.
    scan /usr/share/dvb/dvb-t/uk-WinterHill > /home/~/channels.conf
    This picked up pretty much all the channels & I can tune into BBC channels but receive no picture. I've googled a bit and it seems other people have this problem too and they think it's a problem due to the increased power of the signal after the change over to digital. I've tried a variable attenuator which did no good.
    I've now found that kaffeine can scan for and find the BBC channels AND it can also play them back properly. So the theory about the signal strength being too much for the freecom sticks attenuator is probably a load of guff, at least in my case.
    The data for BBC One from the kaffeine channels.dvb is:-
    TV|BBC ONE|101(2)|102(eng),106(eng),|0|4168|4168|Terrestrial|802000|0|v|-1|-1|-1|-1|8|-1|-1|-1|45|105(16)(1)(1)(eng),||9018|-1|0|
    The same data from the mplayer/scan channels.conf is:-
    BBC ONE:802000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102:4168
    I really don't want to keep kaffeine installed and any links or info that would help convert these channel data files would be greatly appreciated. Seems there are ways to convert them the other way round, but so far I've found nothing to do it fron channels.dvb to channels.conf
    Last edited by Nixie (2009-12-17 08:42:56)

    Do you want to capture a single frame of the video as a separate image? You can play the video full screen in QuickTime, pause it at the appropriate frame and take a screenshot using shift-command-3.
    Matt

  • The product I bought its not working as i expected, it doesn´t translate the exact information from pdf to excel, how can you help me or how can you return my money back....

    how can you help me

    What about adobé export PDF. ?
    Enviado desde mi iPhone
    El 07/05/2014, a las 23:00, Claudio González <[email protected]> escribió:
    The product I bought its not working as i expected, it doesn´t translate the exact information from pdf to excel, how can you help me or how can you return my money back....
    created by Claudio González in Adobe Reader - View the full discussion
    If you bought Reader, you were swindled, because it's a free program. And it has never been able of converting PDF files to any other format.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6363992#6363992
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Adobe Reader by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • HOW DO YOU CONVERT IPHOTO 8.1 TO APERTURE FILE FORMATT

    how do you convert iphoto 8.1.2 photos to aperture file formatt?

    I believe this is still possible if the iPhoto library has not been up graded.
    No joy, Frank. This is what I get, when I try to import an older iPhoto Library into Aperture 3.4.3 using "File > Import > Library":
    Aperture 3.4.x insists on the library being converted to 9.4.x. To be able to import earlier iPhoto Libraries you would have to fall back on Aperture 3.2.x; temporarily install a second, older Aperture version, create a new Aperture library with this version, import the iPhoto Libraries, then open this Aperture library in Aperture 3.4.3 to convert it to a current version.
    bertpa, how many iphoto photos are we talking abourt? If you are having several iPhoto libraries with thousands of edited photos, it really would be worth it to upgrade to iPhoto 9.4 to convert your libraries. iPhoto 9.4 will convert your library to a format with Master-version pairs like aperture uses. If you import this to Aperture, you will be able to import each edited image as a single image with two versions (original and edited)- importing from previous iPhoto versions you would be importing each edited image as two separate images - an edited image and the original. This would be wasteful, if you have many photos in Aperture, and it would cause a lot of additional work to get these duplicates sorted out. But if you only have a handful of iPhoto images, launch iPhoto and use the "File > Export" command to export your photos from iPhoto to a folder. You will have to do it twice - once to export the originals and once to export the edited versions. Then import your exported iPhoto photos into Aperture.
    Regards
    Léonie

  • How do you convert 60fps to 24fps in FCP X

    How do you convert 60fps to 24fps in FCP X for or do I need to figure out the percentages and use that optical flow tool, because I have tried to figure it out but there is a blurry trail when I use the optical flow tool.

    Thanks Tom, so can you do that after it's already been imported? I am out shooting this afternoon, but I will look for it when I get back to the studio. I appreciate the help, I haven't had a lot of time to spend relearning FCP, so any help I can get to make my life easier is super appreciated.
    Cheers,
    Matt

  • How can you get OS Lion back if you already downloaded Mavericks?  I CANNOT live with the battery life of 2 hours!!  HELP

    How can you get OS Lion back if you already downloaded Mavericks?  I CANNOT live with the battery life of 2 hours!!  HELP

    Kappy wrote:
    Don't downgrade OS X without first erasing the drive. You cannot restore a Time Machine backup of Lion directly on top of a later version of OS X such as Mountain Lion or Mavericks.
    When you "Restore from a Time Machine Backup.", the drive will be erased for you, but yes, won't hurt to:
    Boot into Recovery (hold ⌘R on boot)
    Utility->Disk Utility->Erase Macintosh HD, then Repair Macintosh HD
    Quit Disk Utility
    Then Select: Restore from a Time Machine Backup.

  • How do you get Safari Browser back on your Iphone if your daughter erased it?

    how do you get safari browser back on your iphone if your 4 yr. old daughter deletes it by accident?

    You cannot delete Safari.
    It is either on another page, in a folder, or you have restirctiosn set.
    Check all three of these possibiities.

  • HT4972 after downloading ios5.1.1 how do you get your music back on your ipod?

    after downloading ios5.1.1 how do you get your music back on your ipod

    Sync it from your iTunes library
    Redownload iTunes purchases by
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    If it was not in your iTunes library and you updated via iTunes you will have to get the music again sinve synced media like apps and music are not include din the iPod backup that iTunes makes.

  • How do you get your money back from a charge you never even made on the app store?

    How do you get your money back from a charge you never even made on the app store?

    Contact iTunes.
    How to report an issue with Your iTunes Store purchase

  • How do you convert a PDF document to a word document ?

    How do you convert a PDF document to a word document ?

    I just noticed that you added a few more details and it seems like the problem is that part of the conversion is not working. Would it be possible to share the file with me so that I can forward it to the team that owns that service? My email address is [email protected]
    Thanks!
    Pat

  • HT201359 When you have been charged twice for same item, how do you get your money back?

    When you have been charged twice for same item, how do you get your money back?

    Morning Domangere,
    Thanks for using Apple Support Communities.
    Following this article refund will be an option.
    For more information on this, take a look at this article:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    http://support.apple.com/kb/ht1933
    Best of luck,
    Mario

Maybe you are looking for

  • How to customize Category and Category items list while creating New Model

    Hi, what the most convenient way to customize the Category and Category items list while creating New Model? This is standard: Now, what we want to achieve, is to customize this menu, to: 1. Display in the Category window only f.e. two categories: -

  • Dynamic Forms reverting to Static on Saving

    Hi, I have set up several forms as Dynamic, however when I save them while working, Designer saves them as Static. I keep having to remember to do a "File / Save As" to force the Dynamic format. I have looked through the help file and I have set the

  • Vendor evaluation periods

    Hi, In  vendor evaluation, How system calculates from and To date? Example, Vendor is evaluated yearly  twice such as september and March Months. First evaluation happened in the september,on that time system takes current date.Next evaluation happen

  • WSUS 3.2 reports Windows 8 as "Windows 0.0"

    WSUS 3.2 reports Windows 8 as "Windows 0.0" for both Windows 8 Release Preview and Windows Server 2012 Release Candidate. I am running WSUS 3.2.7600.226.

  • I have a question about flash website design and google indexing!

    first off i want to say I hate HTML (call it HTM HELL) I love Flash.Im a big propononent of flash.OK about a month ago I built a 100% flash site,told google to crawl it,then come to find out they cant see any text inside images.So I did what i didnt