Page 2 of 2 FirstFirst 12
Results 21 to 30 of 30
  1. #21
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default Re: double not showing properly?

    Quote Originally Posted by Reeling View Post
    I came here looking for an answer, not to be shown resources of how I can figure the answer out on my own.
    Ah, wrong place then. We try not to spoonfeed here.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  2. #22
    Reeling is offline Member
    Join Date
    Jan 2012
    Posts
    49
    Rep Power
    0

    Default Re: double not showing properly?

    well then. If you are going to teach then at least to it properly. You can't teach someone how to build a plane by showing them blue prints in a language they don't understand. I've said it time and time again I haven't the slightest idea what anything inside of the API means but yet you send me back to it again and again. Clearly I've come to the wrong place when the answer to a question is figure it out for your self. Thanks for nothing.

  3. #23
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,097
    Rep Power
    20

    Default Re: double not showing properly?

    Quote Originally Posted by Reeling View Post
    like i said i cant really read the API but I think it says it returns -0.0.
    THis is why I asked you to post the relevant bit of the API.
    Because it says nothing of the sort.
    There, I've even linked to it for you.

    Quote Originally Posted by DarrylBurke View Post
    That should be DecimalFormat.format(...)

    db
    Oopsie!
    :)

  4. #24
    Reeling is offline Member
    Join Date
    Jan 2012
    Posts
    49
    Rep Power
    0

    Default Re: double not showing properly?

    people i have no idea how to do that, what you just said does not register with me as meaning anything. This is what i've been saying.
    What should be DecimalFormat.format??

    btw im using netbeans 7.0.1 which im fairly sure is using java 7 not 6.
    Last edited by Reeling; 02-03-2012 at 07:34 AM.

  5. #25
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default Re: double not showing properly?

    Not much changed in the API between Java 6 and 7, and nothing in NumberFormat changed.

    Here's the link for the Java 7 API: http://docs.oracle.com/javase/7/docs...format(double)

    Now couldn't you have found that for yourself?

    Clearly I've come to the wrong place when the answer to a question is figure it out for your self.
    Wrong place for you, right place for those who want to actually learn.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  6. #26
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,097
    Rep Power
    20

    Default Re: double not showing properly?

    Quote Originally Posted by Reeling View Post
    people i have no idea how to do that, what you just said does not register with me as meaning anything. This is what i've been saying.
    What should be DecimalFormat.format??

    btw im using netbeans 7.0.1 which im fairly sure is using java 7 not 6.
    It's using whatever JDK it came with, which is not necessarily 7.
    Besides, that bit hasn't changed between versions.

    Anyway, here:
    public final String format(double number)

    What does that tell you?
    Because if you can't even read a method signature then I would suggest you go right back to the start of your notes, or the Oracle tutorial.

  7. #27
    Reeling is offline Member
    Join Date
    Jan 2012
    Posts
    49
    Rep Power
    0

    Default Re: double not showing properly?

    HOLY MOTHER OF GOD IT WORKS!!!! The defining moment was in the oracle tutorial in decimal format where it said "formats number and returns as STRING!!!!!"
    dam it took a ton of time but hopefully it was worth it lol, cheers.

  8. #28
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,097
    Rep Power
    20

    Default Re: double not showing properly?

    Which is why we have been pointing you at the API.
    Because that is what it says...

  9. #29
    Reeling is offline Member
    Join Date
    Jan 2012
    Posts
    49
    Rep Power
    0

    Default Re: double not showing properly?

    ye but it took me like 4 days to find the 1 line that says "formats number and converts to string" would of been so much easier to just say that it doesn't work because the format leaves the numbers in a string variable not a double, don't you think so?
    Anyway problem solved, close thread!

  10. #30
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,097
    Rep Power
    20

    Default Re: double not showing properly?

    We don't say that because knowing how to read the API is very important.
    For starters is saves on threads like this.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. double a * double b = weird output
    By GPB in forum New To Java
    Replies: 3
    Last Post: 03-26-2010, 10:40 AM
  2. JTextField not showing properly in GridBagLayout
    By aserothbw in forum AWT / Swing
    Replies: 13
    Last Post: 10-02-2009, 11:11 AM
  3. Check if double is double
    By marshalthrone in forum New To Java
    Replies: 8
    Last Post: 09-30-2009, 02:51 PM
  4. Replies: 5
    Last Post: 03-21-2009, 09:32 PM
  5. Double.valueOf() vs Double.parseDouble()
    By greenbean in forum New To Java
    Replies: 10
    Last Post: 01-12-2009, 08:39 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
  •