This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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: 805

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

Joined: Aug 06, 2010
Posts: 503

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
I agree. Here's the link:
subject: Negative code
Similar Threads
Difficulties in an IF statement
IllegalStateException in servlet
How to import a jar file into eclipse as a project to use source code of classes of that jar.
return false from a function on error