Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

This is for Trojan

Options
  • 29-05-2001 2:47am
    #1
    Registered Users Posts: 21,264 ✭✭✭✭


    he'll understand. wink.gif
    int num = 42;
    
    System.out.println(
        Integer.toHexString(num)
        ); // "2a"
    
    



Comments

  • Registered Users Posts: 4,427 ✭✭✭Gerry


    And there I was thinking there must be something more to println smile.gif


  • Registered Users Posts: 5,335 ✭✭✭Cake Fiend


    And there I was thinking there must be something more to YORE MA


  • Registered Users Posts: 16,402 ✭✭✭✭Trojan


    42 is the answer!

    What was the question? smile.gif

    But seriously, how was -x encoded? What was the problem there? Gimme binary!! smile.gif

    Al.




    [This message has been edited by Trojan (edited 30-05-2001).]


  • Closed Accounts Posts: 218 ✭✭Void


    Why didn't you mail that to Trojan Hobbes? Is e-mail an insufficient medium for your needs? Please refrain from spamming this board in the future, unless you have something worthwhile to say. That precludes replying to this post by the way, unless you have something pointless to say, in which case feel free.

    Damn, I've forgotten how to do a smiley. Oh well...


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Well I don't have Trojans email do I?

    Anyway trojan, java inverts all the bits not just the high bit for negative numbers.

    So I think -0 would be FF then -1 is FE (?) Haven't checked but you get the idea. Doesn't matter really as the Int2Hex function does what I want.



  • Advertisement
  • Registered Users Posts: 16,402 ✭✭✭✭Trojan


    Perhaps this helps with smiling problem you have: clnre2.jpg

    That's a bit mad Hobbes, you'd think they'd use standard encoding (2's complement is it?)....

    Cheers anyways.

    Al.

    PS Ah g'wan Peter, smile! smile.gif


Advertisement