Decimal to Binary Converter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • javamonster
    New Member
    • Jul 2007
    • 1

    Decimal to Binary Converter

    guys i need a help... i wanna write a java programmee to display the binary number of the entered decimal number.

    for ex : in t text area u should type a desimal number and press "Convert" button to display its binary in the next txt field

    need help mates,

    p.s : should use only 1 statement; stack
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by javamonster
    ...

    p.s : should use only 1 statement; stack
    What do you mean by that p.s?

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Originally posted by javamonster
      guys i need a help... i wanna write a java programmee to display the binary number of the entered decimal number.

      for ex : in t text area u should type a desimal number and press "Convert" button to display its binary in the next txt field

      need help mates,

      p.s : should use only 1 statement; stack
      If you're dealing with Strings and Integers check out the API documentation for
      those classes: String and Integer. In your case most if not all of the work has
      been done already and implemented by methods in the Integer class. Convert
      an input string (representing a decimal notation of a number) to an Integer and
      convert it back again to a string binary representation of that same number.

      kind regards,

      Jos

      ps. I don't understand your ps either.

      Comment

      • prometheuzz
        Recognized Expert New Member
        • Apr 2007
        • 197

        #4
        !@OP:
        Don't bother with this doofus. S/he posted this exact same "question" in the folloing Usenet groups without bothering to reply to a single one of them:
        mailing.freebsd .java
        comp.lang.java. advocacy
        comp.lang.java. help
        comp.lang.java. programmer

        Comment

        • JosAH
          Recognized Expert MVP
          • Mar 2007
          • 11453

          #5
          Originally posted by prometheuzz
          !@OP:
          Don't bother with this doofus. S/he posted this exact same "question" in the folloing Usenet groups without bothering to reply to a single one of them:
          mailing.freebsd .java
          comp.lang.java. advocacy
          comp.lang.java. help
          comp.lang.java. programmer

          I guess s/he got spoonfed somewhere then. no reading, no understanding, just
          copy and paste; that's what knowledge is all about in this century ;-)

          kind regards,

          Jos

          Comment

          Working...