Results 1 to 2 of 2
  1. #1
    vivekvk is offline Member
    Join Date
    Dec 2010
    Rep Power

    Post help regarding getting input

    hi i am newbie to java.. i have a problem... the following is my scenario:

    1. get binary input from user (say 10110) - using AWT- text box this as a double array or int array as
    according to the previous example
    a[0] = 1
    a[1] = 0
    a[2] = 1
    a[3] = 1
    a[4] = 1

    can anyone tell me the way to do this?? i am getting struck in converting string into binary.. i exactly want each binary number entered to be stored as separate array values.. pls help..

  2. #2
    javaman1 is offline Member
    Join Date
    Sep 2010
    Rep Power


    Any code with this? What you need to do is convert the String to integers. You can use String methods found in the API's to set the numbers to characters the parse them as integers.

Similar Threads

  1. Need help getting input(first/last name) from user
    By nightrise420 in forum New To Java
    Replies: 11
    Last Post: 09-11-2010, 03:09 AM
  2. Input JOptionPane
    By nic21 in forum AWT / Swing
    Replies: 1
    Last Post: 11-18-2009, 05:32 PM
  3. Input help
    By rice in forum New To Java
    Replies: 6
    Last Post: 09-26-2009, 07:07 PM
  4. Input technique for unknown lines of input
    By ducreative in forum New To Java
    Replies: 16
    Last Post: 09-23-2009, 09:26 AM
  5. how to take input and verify input in Java programs
    By bilal_ali_java in forum Advanced Java
    Replies: 0
    Last Post: 07-21-2007, 08:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts