This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Java in General and the fly likes Negative code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Negative code" Watch "Negative code" New topic
Author

Negative code

Noluababalo Ntisa
Greenhorn

Joined: Oct 08, 2013
Posts: 1
Hi All

I would like to know, how to write a code that will store all the nagative numbers.


Regards
nhlanhla mazibuko
Tim Cooke
Sheriff

Joined: Mar 28, 2008
Posts: 2114
    
  96

Do you have any idea how you might do this? Considering that "all the negative numbers" is an infinite Set, I think my computer would run out of memory if you tried to store each one explicitly.


Tim Driven Development
Dieter Quickfend
Bartender

Joined: Aug 06, 2010
Posts: 543
    
    4

the same way you store all the positive numbers I'd guess.


Oracle Certified Professional: Java SE 6 Programmer && Oracle Certified Expert: (JEE 6 Web Component Developer && JEE 6 EJB Developer)
Muhammad Khojaye
Ranch Hand

Joined: Apr 12, 2009
Posts: 449

Noluababalo Ntisa wrote:I would like to know, how to write a code that will store all the nagative numbers.

What you think? Have you done any analysis? Please SSE


http://muhammadkhojaye.blogspot.com/
 
Have you checked out Aspose?
 
subject: Negative code
 
It's not a secret anymore!