Results 1 to 10 of 10

Thread: Longer than Long

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2005
    Posts
    33

    Longer than Long

    Hello.

    What variable would you use if integer is too small, and long is too small. I was to hold very large numbers greater than 19 digits.

    Thanks for any help.

  2. #2
    Addicted Member SpS's Avatar
    Join Date
    Jul 2005
    Posts
    201

    Re: Longer than Long

    You can use BigInteger class.
    #Appreciate others by rating good posts !!

    #The Software Peter Principle is in operation when unwise developers "improve" and "generalize" the software until they themselves can no longer understand it, then the project slowly dies.

    #People who are still ignorant of their ignorance are dangerous.

  3. #3
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Wink Re: Longer than Long

    Quote Originally Posted by sunnypalsingh
    You can use BigInteger class.

    Correct

    But it is better if you can explain littlebit more here. I think MathewF can confused with this.

    You can find it with java.math

    You can used BigInteger class for lots of constructors and methods, with different types of varible. Read this page and you can find more.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Longer than Long

    Quote Originally Posted by eranga262154
    But it is better if you can explain littlebit more here. I think MathewF can confused with this.
    Why? Typing "java BigInteger" into Google leads me immediately to a reference of the class. Which is all the useful content of your post anyway. The "lots of constructors and methods" is perfectly meaningless.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Wink Re: Longer than Long

    Quote Originally Posted by CornedBee
    Why? Typing "java BigInteger" into Google leads me immediately to a reference of the class. Which is all the useful content of your post anyway. The "lots of constructors and methods" is perfectly meaningless.
    Correct

    Google can leads you anywhere you want quickly. But most of the people don't know how to find something quickly. They don't know difference between "java BigInteger" and "java+BigInteger".

    So what I'm trying to say is, lot of people are here to get something they want in quick time. Most of them don't like spend much time to find what they want. Isn't it?

    If so, I think if we send something here it should be complete one. Isn't it? Am I wrong?
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Longer than Long

    Well, I personally think people can do some work too. Otherwise, I'd have to answer all those "please write my code for me" threads.

    Now, if you want to give very precise and detailed information, that's fine with me. It's your time, not mine. I was just slightly irritated by your suggestion that sunnypalsingh's answer was insufficient.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7
    Lively Member
    Join Date
    Dec 2005
    Posts
    68

    Re: Longer than Long

    Quote Originally Posted by CornedBee
    I was just slightly irritated by your suggestion that sunnypalsingh's answer was insufficient.
    Please excuse eranga262154 for trying to be helpful. He was just expanding on what was said trying to give more information. People come here for help, and that's what he was giving. He didn't waste your time, or in any way shapre or form deserve what you said.

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Longer than Long

    Quote Originally Posted by lunchboxtheman
    Please excuse eranga262154 for trying to be helpful. He was just expanding on what was said trying to give more information. People come here for help, and that's what he was giving. He didn't waste your time, or in any way shapre or form deserve what you said.
    Funny that you quote this part of my post and then accuse me of something completely different ...
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  9. #9
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: Longer than Long

    Ok, don't you think it's enough with who is wasting who's time!
    Please stop the out of topic posts guys
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  10. #10
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Wink Re: Longer than Long

    Quote Originally Posted by ComputerJy
    Ok, don't you think it's enough with who is wasting who's time!
    Please stop the out of topic posts guys

    Correct

    Don't worry about what others doing. Just try to do what you want for you and for others.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

Posting Permissions

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



Click Here to Expand Forum to Full Width