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
    Likes Received:
    0
    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. Advertisements

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:
    9,182
    Pieter Hulshoff
    Oct 11, 2004
  2. Alan Silver
    Replies:
    10
    Views:
    860
    Alan Silver
    Mar 9, 2005
  3. Adam Knight

    Sign Out before User Controls are added?

    Adam Knight, Sep 23, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    455
    Adam Knight
    Sep 23, 2005
  4. Jimmy
    Replies:
    1
    Views:
    1,160
    Cowboy \(Gregory A. Beamer\)
    Nov 21, 2006
  5. EK
    Replies:
    0
    Views:
    464
  6. MRAB
    Replies:
    2
    Views:
    443
    John Machin
    Jan 31, 2009
  7. Phrogz
    Replies:
    2
    Views:
    214
    William James
    Feb 19, 2005
  8. Jimmy
    Replies:
    3
    Views:
    2,676
    shimmyshack
    Nov 20, 2006
Loading...