File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Negative code" Watch "Negative code" New topic

Negative code

Noluababalo Ntisa

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.

nhlanhla mazibuko
Tim Cooke

Joined: Mar 28, 2008
Posts: 526

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
Ranch Hand

Joined: Aug 06, 2010
Posts: 359
the same way you store all the positive numbers I'd guess.

Oracle Certified Professional: Java SE 6 Programmer
Oracle Certified Expert: Java EE 6 Web Component Developer
Oracle Certified Expert: Java EE 6 Enterprise JavaBeans 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
I agree. Here's the link:
subject: Negative code
Similar Threads
return false from a function on error
Difficulties in an IF statement
How to import a jar file into eclipse as a project to use source code of classes of that jar.
IllegalStateException in servlet