• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Can Math.abs return a negative number? (Was useless: Explain)

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The abs() method can return a negative if the argument is the minimum
int or long value equal to the value of Integer.MIN_VALUE or
Long.MIN_VALUE, respectively.

Can anyone elaborate this in detail may be with one example
Thank You
[ December 20, 2006: Message edited by: Barry Gaunt ]
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An SCJP candidate is expected to be able to write a few lines of simple code and to be able to compile and run it. Why not try it yourself? If the code does not give the results you expect then ask again.
 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


An SCJP candidate is expected to be able to write a few lines of simple code and to be able to compile and run it. Why not try it yourself? If the code does not give the results you expect then ask again.



Well said.
 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Barry,

what you said is 100% right. Normally everyday, I be here at the ranch from morning till evening and I try to answer and ask questions how much ever possible(based on how much I know). But before doing that I coplile them myself. When I saw this post, I thought of replying and when I saw that this is something that needs to be explaned, I felt lazy. I can know that no one will be interested to write lines and lines of text rather than looking at the code and just explain only the juicier bits.

Barry! Why don't you move this post to Java Beginners Forum??
 
Ravi Ahuja
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[c]
I am sorry barry and fellow freinds you all are absolutely correct sorry for asking such a useless question I will make sure next time i write some lines of codes and first compile and execute the code before asking
Sorry guys
Thanks Anyways
[/c]
 
Ravi Ahuja
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[c]
I am sorry barry and fellow freinds you all are absolutely correct sorry for asking such a useless question I will make sure next time i write some lines of codes and first compile and execute the code before asking
I guess i have posted 2 useless post i will make sure this wont happen again
Sorry guys
Thanks Anyways
[/c]
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ravi,

There is nothing to be sorry. Everyone here is soo friendly. Just for your own benefit, compile the code and put the code here that you dont understand, so that you get the maximum help from your fellow ranchers.
 
author
Posts: 9050
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, I'd like to ask everyone to mention in the thread title when they are posting a 1.4 question - like this one is.

Thanks!
 
I think I'll just lie down here for a second. And ponder this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic