How to hide negative sign before a number in java

Discussion in 'Java' started by Ekta Midha, Aug 5, 2008.

  1. Ekta Midha

    Ekta Midha

    Joined:
    Aug 5, 2008
    Messages:
    1
    i want to hide negative sign before number.But that number should behave like negative
    It means my reqiuirement is

    like -4 and 2 are two numbers.
    i want to add these two numbers.
    -4+2 becomes -2..


    i want negative sign not to be displayed.
    4+2 should be -2.
    please tell me the solution
    for your information...Abs function isnot the solution as in this number becomes positive.
    Ekta Midha, Aug 5, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. prem_eda
    Replies:
    5
    Views:
    7,812
    Pieter Hulshoff
    Oct 11, 2004
  2. Jimmy
    Replies:
    1
    Views:
    914
    Cowboy \(Gregory A. Beamer\)
    Nov 21, 2006
  3. EK
    Replies:
    0
    Views:
    307
  4. MRAB
    Replies:
    2
    Views:
    292
    John Machin
    Jan 31, 2009
  5. Jimmy
    Replies:
    3
    Views:
    2,378
    shimmyshack
    Nov 20, 2006
Loading...

Share This Page