binary string to integer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KWSW
    New Member
    • May 2007
    • 72

    binary string to integer

    Another question to ask about built in java functions.

    I know that there is a Integer.toBinar yString function where I can get the binary value of an integer in a string representation.

    Example : from 107 i get "1101011"

    Question would be, is there a function where I can convert back from string to integer. Like int i = functionName("1 101011") where i will contain 107.

    thanks again.
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Have a look at the Integer.parseIn t(String s, int radix) method.

    kind regards,

    Jos

    Comment

    • KWSW
      New Member
      • May 2007
      • 72

      #3
      Originally posted by JosAH
      Have a look at the Integer.parseIn t(String s, int radix) method.

      kind regards,

      Jos
      ok thanks, will take a look :)

      Comment

      Working...