• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Wrapper class ??

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Java, primitive types have associated wrapper classes,
like primitive type int VS Integer class etc,
But can I use objects of wrapper class to do operations of mathematics??
Or I should convert wrapper class to primitive type ???


Another question is about n! .When I write codes for practice,the result
of 5000! is too big. Should I use class BigDecimal or BigInteger in java.math package??

I need your help.
Thankx your help in advanced.
[ March 10, 2004: Message edited by: Ha LoHa ]
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But can I use objects of wrapper class to do operations of mathematics??
No.
Or I should convert wrapper class to primitive type ???
Yes.
Note that others have implemented their own "wrapper" classes which do provide methods for various mathematical operations.
When I write codes for practice,the result
of 5000! is too big. Should I use class BigDecimal or BigInteger in java.math package??

Yes, you could do that.
 
Chen SanHau
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Note that others have implemented their own "wrapper" classes which do provide methods for various mathematical operations.

What others?
Would you tell me some examples ??
 
That feels good. Thanks. Here's a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic