Binary form of string

Hi All,
I have written a small program which prints the addresses of the line. But, I don't know how to get the binary form of the string. How the binary form of a string? Will it be 0s and 1s or someother format?
How to get the binary form of a string?
        try
            // Open or create the output file
            FileReader fr = new FileReader("./Sample.txt");
            BufferedReader br = new BufferedReader(fr);
            String inLine;
            while((inLine = br.readLine())!=null)
                byte[] data = inLine.getBytes();
                BinaryRefAddr  binary = new BinaryRefAddr("01",data);
                System.out.println(binary.getContent());
                System.out.println(binary.toString());
        catch (IOException e)
        }

Arivu,
Could you give an example of what a binary form is?
For example
What is the binary form of "2"?
Is it a String of 0s an 1s such as "00110010"?
or is an int with value of 50?
Or what?

Similar Messages

  • How to read data in binary form from file?

    Hi,
    i try to write an implementation of LZW. I need to read data in binary form from a file. How can i do that? I cannot find something like "binary input stream" ...
    Thanks

    Hi,
    i try to write an implementation of LZW. I need to
    read data in binary form from a file. How can i do
    that? I cannot find something like "binary input
    stream" ...
    ThanksInputStream reads bytes. I don't understand your question.

  • I need to pass a query in form of string to DBMS_XMLQUERY.GETXML package...the parameters to the query are date and varchar ..please help me..

    I need to pass a query in form of string to DBMS_XMLQUERY.GETXML package...the parameters to the query are date and varchar ..please help me build the string .Below is the query and the out put. ( the string is building fine except the parameters are with out quotes)
    here is the procedure
    create or replace
    procedure temp(
        P_MTR_ID VARCHAR2,
        P_FROM_DATE    IN DATE ,
        P_THROUGH_DATE IN DATE ) AS
        L_XML CLOB;
        l_query VARCHAR2(2000);
    BEGIN
    l_query:=  'SELECT
        a.s_datetime DATETIME,
        a.downdate Ending_date,
        a.downtime Ending_time,
        TO_CHAR(ROUND(a.downusage,3),''9999999.000'') kWh_Usage,
        TO_CHAR(ROUND(a.downcost,2),''$9,999,999.00'') kWh_cost,
        TO_CHAR(ROUND(B.DOWNUSAGE,3),''9999999.000'') KVARH
      FROM
        (SELECT s_datetime + .000011574 s_datetime,
          TO_CHAR(S_DATETIME ,''mm/dd/yyyy'') DOWNDATE,
          DECODE(TO_CHAR(s_datetime+.000011574 ,''hh24:'
          ||'mi''), ''00:'
          ||'00'',''24:'
          ||'00'', TO_CHAR(s_datetime+.000011574,''hh24:'
          ||'mi'')) downtime,
          s_usage downusage,
          s_cost downcost
        FROM summary_qtrhour
        WHERE s_mtrid = '
        ||P_MTR_ID||
       ' AND s_mtrch   = ''1''
        AND s_datetime BETWEEN TO_DATE('
        ||P_FROM_DATE||
        ',''DD-MON-YY'') AND (TO_DATE('
        ||P_THROUGH_DATE||
        ',''DD-MON-YY'') + 1)
        ) a,
        (SELECT s_datetime + .000011574 s_datetime,
          s_usage downusage
        FROM summary_qtrhour
        WHERE s_mtrid = '
        ||P_MTR_ID||
        ' AND s_mtrch   = ''2''
        AND s_datetime BETWEEN TO_DATE('
        ||P_FROM_DATE||
        ',''DD-MON-YY'') AND (TO_DATE('
        ||P_THROUGH_DATE||
        ','' DD-MON-YY'') + 1)
        ) B
      where a.S_DATETIME = B.S_DATETIME(+)';
    SELECT DBMS_XMLQUERY.GETXML('L_QUERY') INTO L_XML   FROM DUAL;
    INSERT INTO NK VALUES (L_XML);
    DBMS_OUTPUT.PUT_LINE('L_QUERY IS :'||L_QUERY);
    END;
    OUTPUT parameters are in bold (the issue is they are coming without single quotes otherwise th equery is fine
    L_QUERY IS :SELECT
        a.s_datetime DATETIME,
        a.downdate Ending_date,
        a.downtime Ending_time,
        TO_CHAR(ROUND(a.downusage,3),'9999999.000') kWh_Usage,
        TO_CHAR(ROUND(a.downcost,2),'$9,999,999.00') kWh_cost,
        TO_CHAR(ROUND(B.DOWNUSAGE,3),'9999999.000') KVARH
      FROM
        (SELECT s_datetime + .000011574 s_datetime,
          TO_CHAR(S_DATETIME ,'mm/dd/yyyy') DOWNDATE,
          DECODE(TO_CHAR(s_datetime+.000011574 ,'hh24:mi'), '00:00','24:00', TO_CHAR(s_datetime+.000011574,'hh24:mi')) downtime,
          s_usage downusage,
          s_cost downcost
        FROM summary_qtrhour
        WHERE s_mtrid = N3165 AND s_mtrch   = '1'
        AND s_datetime BETWEEN TO_DATE(01-JAN-13,'DD-MON-YY') AND (TO_DATE(31-JAN-13,'DD-MON-YY') + 1)
        ) a,
        (SELECT s_datetime + .000011574 s_datetime,
          s_usage downusage
        FROM summary_qtrhour
        WHERE s_mtrid = N3165 AND s_mtrch   = '2'
        AND s_datetime BETWEEN TO_DATE(01-JAN-13,'DD-MON-YY') AND (TO_DATE(31-JAN-13,' DD-MON-YY') + 1)
        ) B
      where a.S_DATETIME = B.S_DATETIME(+)

    The correct way to handle this is to use bind variables.
    And use DBMS_XMLGEN instead of DBMS_XMLQUERY :
    create or replace procedure temp (
      p_mtr_id       in varchar2
    , p_from_date    in date
    , p_through_date in date
    is
      l_xml   CLOB;
      l_query VARCHAR2(2000);
      l_ctx   dbms_xmlgen.ctxHandle;
    begin
      l_query:=  'SELECT
        a.s_datetime DATETIME,
        a.downdate Ending_date,
        a.downtime Ending_time,
        TO_CHAR(ROUND(a.downusage,3),''9999999.000'') kWh_Usage,
        TO_CHAR(ROUND(a.downcost,2),''$9,999,999.00'') kWh_cost,
        TO_CHAR(ROUND(B.DOWNUSAGE,3),''9999999.000'') KVARH
      FROM
        (SELECT s_datetime + .000011574 s_datetime,
          TO_CHAR(S_DATETIME ,''mm/dd/yyyy'') DOWNDATE,
          DECODE(TO_CHAR(s_datetime+.000011574 ,''hh24:'
          ||'mi''), ''00:'
          ||'00'',''24:'
          ||'00'', TO_CHAR(s_datetime+.000011574,''hh24:'
          ||'mi'')) downtime,
          s_usage downusage,
          s_cost downcost
        FROM summary_qtrhour
        WHERE s_mtrid = :P_MTR_ID
        AND s_mtrch   = ''1''
        AND s_datetime BETWEEN TO_DATE(:P_FROM_DATE,''DD-MON-YY'')
                           AND (TO_DATE(:P_THROUGH_DATE,''DD-MON-YY'') + 1)
        ) a,
        (SELECT s_datetime + .000011574 s_datetime,
          s_usage downusage
        FROM summary_qtrhour
        WHERE s_mtrid = :P_MTR_ID
        AND s_mtrch   = ''2''
        AND s_datetime BETWEEN TO_DATE(:P_FROM_DATE,''DD-MON-YY'')
                           AND (TO_DATE(:P_THROUGH_DATE,'' DD-MON-YY'') + 1)
        ) B
      where a.S_DATETIME = B.S_DATETIME(+)';
      l_ctx := dbms_xmlgen.newContext(l_query);
      dbms_xmlgen.setBindValue(l_ctx, 'P_MTR_ID', p_mtr_id);
      dbms_xmlgen.setBindValue(l_ctx, 'P_FROM_DATE', to_char(p_from_date, 'DD-MON-YY'));
      dbms_xmlgen.setBindValue(l_ctx, 'P_THROUGH_DATE', to_char(p_through_date, 'DD-MON-YY'));
      l_xml := dbms_xmlgen.getXML(l_ctx);
      dbms_xmlgen.closeContext(l_ctx);
      insert into nk values (l_xml);
    end;

  • Passing values to form bean string array from dynamic added textboxes

    Hi,
    I am unable to pass values to form bean string array from a jsp in which I have incorporated dynamically adding of textboxes in javascript.
    I have given add/delete row option in the jsp. If there is single row, this is working fine. But after adding a row, I am not able to either do any validations on added textboxes or pass the values to the String array form bean variable.
    code snippet:
    var cell6 = row.insertCell(4);
    var element5 = document.createElement("input");
    element5.type = "text";
    element5.className = "formtext1";
    element5.size = "5";
    element5.value = "00.00";
    element5.name= "qty"; // this is a string array of the form bean.
    element5.onchange=function() {checkNumeric(this);};
    cell6.appendChild(element5);
    <html:text styleClass="formtext1" property="qty" value="" size="5" styleId="qty" onchange="checkNumeric(this)"/></td>
    form bean declaration
    private String[] qty; Please help.
    Edited by: j2eefresher on Jan 12, 2010 11:23 PM

    Shivanand,
    There's no need to post that much code when you could create a very short test case that demonstrates only the problem you are having.
    You're using &NAME. notation on something that isn't a page or application item. You can't reference PL/SQL variables that way (or any other way) outside the PL/SQL scope. For your situation, you could create a page item named P55_DOCID and assign it a value in the PL/SQL process (:P55_DOCID := DOCID;), then reference &P55_DOCID. in HTML areas like the success message.
    Scott

  • Store file in binary form in the hard disk- how?

    How can i store a file in binary form in the hard disk?
    Thanks

    How can i store a file in binary form in the hard disk? Simply open a FileOutputStream and start writing bytes to that
    file. Don't forget to close that stream when you're done with it.
    kind regards,
    Jos

  • Best way to put binary-data into string?

    Hi there!
    What I want to do is to transfer binary data via HTTP/GET so what I have to do is to transfer binary data into a string.
    Currently I do this the follwing way:
          byte[] rawSecData = new byte[4]; //any binary datas
          ByteArrayOutputStream secBOS = new ByteArrayOutputStream(4);
          DataOutputStream secDOS = new DataOutputStream(secBOS);
          for(int i=0; i < rawSecData.length; i++)
            secDOS.writeByte(rawSecData);
    secDOS.flush();
    String secData = secBOS.toString();
    System.err.println("Lenght of resulting String: "+secData.length());
    I know that this way already worked fine, however I now set up my system up again with another linux-distro and now strange things happen.
    e.g. the secData string differs in lenght from run-to-run between 2 and 4 and I don know at all why?
    Transferring the binary-stuff into string-stuff (e.g. short-binary 255 255, String: 65536) is not possible for me because of various reasons.
    The funny thing is that I remeber that this already worked some time ago and I can figure out why it now doesnt...
    Please help!

    First of all thanks a lot for your help!
    Yes, I already think its an encoding problem, but how can I specify the encoding in my application in a portable way. I dont have an idea what to do.
    My applikation should run as applet on many different 1.1+ VMS (msjvm, netscape-1.1.5, ...).
    Thanks again, lg Clemens

  • Binary value to string

    Hi,
    I want to convert binary value to string format. How can i do that if possible please give me sample code.?
    One more question is i want to do reverse thing also that is convert string value to binary format.?
    Waiting for reply

    There are methods in Integer, Long etc for transforming to binary.
    I think there are probably also methods to go from binary to an int. Check out the JavaDoc

  • How to save data in oracle9i in binary form and how to retrieve it

    Hello,
    Kindly tell me how can i save my data in binary form(UTF8) in oracle9i through developer6i Forms and how to retrieve it. Kindly tell me step by step procedure.
    Regards,
    Shahzaib

    save my data in binary formCould you explain a little more? What excatly do you want to store? Something like a BLOB?

  • Find logo from binary or hex string

    HI All ,
    I have file 2 strings one with HEX and one binary this to string is contain the value
    for attachment (logo) ,which FM or method i should use to see the logo, the picture itself  ?
    Regards
    James
    Edited by: James Herb on Feb 28, 2010 5:32 PM

    Hi James,
    This methods and function modules should work for you.
          CALL METHOD cl_binary_relation=>read_links_of_binrel
            EXPORTING
              is_object   = is_object
              ip_relation = 'ATTA'
            IMPORTING
              et_links    = et_links.
        catch
        cx_obl_parameter_error into icx_obl_parameter_error.
          exception_string = icx_obl_parameter_error->get_longtext( ).
        catch cx_obl_internal_error into icx_obl_internal_error .
          exception_string = icx_obl_internal_error->get_longtext( ).
        catch
        cx_obl_model_error into icx_obl_model_error.
          exception_string = icx_obl_model_error->get_longtext( ).
      ENDTRY.
      SORT et_links BY utctime.
      LOOP AT et_links INTO et_links_s.
        v_tbx       = sy-tabix.
        document_id = et_links_s-instid_b.
        CALL FUNCTION 'SO_DOCUMENT_READ_API1'
          EXPORTING
            DOCUMENT_ID                      = document_id
          FILTER                           = 'X '
         IMPORTING
            DOCUMENT_DATA                    = document_data
         TABLES
            OBJECT_HEADER                    = object_header
            OBJECT_CONTENT                   = object_content
          OBJECT_PARA                      =
          OBJECT_PARB                      =
          ATTACHMENT_LIST                  =
          RECEIVER_LIST                    =
          CONTENTS_HEX                     =
         EXCEPTIONS
            DOCUMENT_ID_NOT_EXIST            = 1
            OPERATION_NO_AUTHORIZATION       = 2
            X_ERROR                          = 3
            OTHERS                           = 4.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    ENDLOOP.

  • Binary Stored as String

    Hi,
    I am storing Binary Data into Varchar(Max) field, while migrating to another binary field, since it is stored earlier in the table with the varchar and then insert into Binary will again convert the string into Binary data. which is corrupting   data.
    How to Insert Varchar(max) field to Binary Field in another table
    Thanks, Parth

    Hi Parth,
    Regarding your description, the binary data is stored in a varchar(max)  column, do you mean the values of the varchar(max) column are like ‘0x5445535420535452494E47’? So when you tried to migrate it to a binary field, the string ‘0x5445535420535452494E47’
    was converted into binary other than the value the string stands for?
    If my understanding is correct, you may reference the code as below, just use the built-in
    COVERT with one more optional parameter, you can read more details under 
    Binary Styles in the covert page.
    DECLARE @srcTbl TABLE(str1 VARCHAR(MAX))
    DECLARE @tarTbl TABLE(str1 VARBINARY(MAX))
    INSERT INTO @srcTbl SELECT '0x5445535420535452494E47'
    INSERT INTO @tarTbl SELECT CONVERT(VARBINARY(MAX),str1,1) FROM @srcTbl -- 1 here is necessary
    SELECT str1 FROM @srcTbl
    SELECT str1 FROM @tarTbl
    If you have any question, feel free to let me know.
    Best regards,
    Eric Zhang
    TechNet Community Support

  • How to make an XML in form of String to well-formed XML document

    Hi Folks,
         Thanks for all you support in Advance, i have a requirement, where i have an XML in one line string form and i wondering how to convert into well formed XML?
    Input XML sample:
    <root> <one><link1></link1></one><two></two> </root>
    to well-formed XML
    <root>
          <one>
              <link1></link1>
         </one>
         <two>
         </two>
    </root>
    I was trying to create a well-formed document using DOM or SAX parsers in ExcuteScript activity, but it is leading to some complicated exceptions. And i am looking for the simplest way for transformation.
    Please let me know
    thanks,
    Rajesh

    Rajesh,
    I don't understand. There is no difference between the two XML instances other than whitespace. They are both well-formed XML.
    <root> <one><link1></link1></one><two></two> </root>
    <root>
          <one>
              <link1></link1>
         </one>
         <two>
         </two>
    </root>
    Steve

  • How to print an int in binary form ?

    Say I have an int storing 5, can I print it out as 00000101 ?
    Thank you very much

    The simplest way to do this is:
    int i = 5;
    String s = Integer.toBinaryString(i);
    System.out.println("i is: " + s);
    For me, that outputs:
    i is: 101
    Unfortunately, that doesn't get you the padding you require. Is the padding important to you, or just the binary conversion part?

  • Reading a binary file to string variable does not populate correctly

    Hi, I am new to Adobe Air/Flex and I'm trying to read a
    binary file which also contains text in "cleartext". The problem
    I'm having is that when I call FileStream.readUTFBytes method, only
    the first 6 characters are showing up in my string variable
    "contents" when I debug it in FlexBuilder or use a trace command
    and debug it. I have also tried with other types of files but I
    have a similar problem unless it's a non-binary file.
    Am I doing something incorrectly or should I be reading a
    binary file differently than the way I'm reading it currently?
    The source code is shown below.
    TIA,
    Magnus
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import flash.filesystem.File;
    private function readFiles():void{
    var feedFile:File = File.userDirectory.resolvePath( "Local
    Settings/Application Data/Microsoft/Feeds/AppScout~.feed-ms" );
    var stream:FileStream = new FileStream();
    stream.open( feedFile, FileMode.READ );
    var contents:String =
    stream.readUTFBytes(stream.bytesAvailable);
    trace(contents);
    stream.close();
    ]]>
    </mx:Script>
    <mx:Button x="121" y="66" label="Button"
    click="readFiles()" />
    </mx:WindowedApplication>

    It's difficult to tell what it is, it looks like a binary
    pipe symbol but I can copy it from TextPad for example. Some of the
    characters following it cannot be copied from TextPad which I
    assume is because it's null. I can read the whole file in C#/.Net
    and assign it to a string variable without any problems but perhaps
    Air is somewhat limited to binary content.

  • Read in Binary form in VISA read function

    Dear All,
    I have connected my Device to the serial Port. and data read from the buffer is stored in text format. I want to view the data in binary format .
    Actually, i have performed the same function in Visual Basic. there also if i view the data in text format, it shows some junk values. but if i view the data in binary, it shows the actual data coming from the instrument .
    I dont know how to modify the VISA read function. can any one pls tell me how can i read the data in binary format?
    Thanks
    Ritesh

    Oops!  No it didn't.
    Lab VIEW 2012 (if that makes a dif)
    I'm using the VISA Read function to take ADC readings in from a microcontroller.  The VISA Read function outputs the data as a string.  Easy to convert the string to U8, either with the conversion function or type cast function, and works great except for a tiny corner case when the ADC reading is zero.  The VISA Read function treats the 8-bit zero reading as a null character and strips it out.
    Apparently, since this is done by the VISA Read function as it's building the string, type casting and or converting the output string from the VISA Read function doesn't "bring the zeros back".
    I've tried setting the VISA property "Discard NUL Characters" to false, and that didn't seem to help.
    My current work around is just to never have the micro send a zero ADC reading. 
    Anyway, I'm a Lab VIEW noob, so while this isn't essential to my project, I remain curious about how to send Lab VIEW serial data that isn't automatically considered characters, thrown into a string with all the zeros stripped out.
    Regards,
    Who

  • Binary Search Using String

    I'm trying to perform a binary search on CDs stored in an arraylist but it will only work with the titles with no spaces (Such as Summertime & Heartless but not Dance Wiv Me). Is this a bug or will it simply not work with strings with a space in them? Also when it does work it will return the correct title but the artist and price aren't in the same arraylist index as the search value that was returned.
    * Program to allow customers to purchase CDs from an online store
    * @author (Martin Hutton)
    * @version (24/05/2009)
    import java.util.*;
    public class CDs
        private Scanner input;
        private Scanner in;
        private Scanner sc;
        private CdList aCd;
        CDs()
            this.aCd = new CdList();
            this.menu();
        public void menu()
            int select = 5;
            do
                //Menu Display
                System.out.println("\n\t\t--== Main Menu ==---");
                System.out.println("\n\t\t1. View CDs");
                System.out.println("\n\t\t2. Purchase CDs");
                System.out.println("\n\t\t3. Search CDs");
                System.out.println("\n\t\t4. Sort CDs Titles");
                System.out.println("\n\t\t5. Exit");
                input = new Scanner(System.in);
                select = input.nextInt();
                switch (select)
                    case 1 : this.view();
                    break;
                    case 2 : this.purchase();
                    break;
                    case 3 : this.search();
                    break;
                    case 4 : this.sort();
                    break;
                    case 5 : exit();
                    break;
                    default : System.out.println("Error! Incorrect menu selection!");
            while ( select != 5 );
        public void view()
            System.out.printf("\f");//Clear screen
            System.out.println("\t\t--== Avaiable CDs ==--");
            System.out.println("");
            int size = aCd.getTitle().size();
            //loop to display array date
            for ( int i = 0; i < size; i++ )
                System.out.println( "\t" + i + "\t" + aCd.getTitle().get(i)+ "\t\t\t" + aCd.getArtist().get(i) + "\t\t\t" + aCd.getPrice().get(i) + "\n");
        public void purchase()
           System.out.printf("\f");//Clear screen
           double arrayPurchase[] = new double [15];
           in = new Scanner(System.in);
           sc = new Scanner(System.in);
           double total = 0.0;
           int itemindex = 0;
           System.out.println("How many CDs would you like to purchase? ");
           int amountNumbers = in.nextInt();
           for(int i = 0; i< amountNumbers; i++)
               int q = itemindex;
               System.out.println("Please enter the CD number: ");
               q = in.nextInt();
               //aCd.getPrice().get(q);
               arrayPurchase[i] = aCd.getPrice().get(q);
               total += arrayPurchase;
    System.out.println("\nThe total is: £" + total );
    public void search()
    System.out.println("\t\t--== Search CDs ==--\n");
    System.out.println("Search for a CD: ");
    String lc = input.next();
    Collections.sort(aCd.getTitle());
    int index = Collections.binarySearch(aCd.getTitle(),lc);
    if ( index < 0 )
    System.out.println("Sorry, CD not avaiable");
    else
    // System.out.println(aCd.getPrice().get(index));
    System.out.println( index + aCd.getTitle().get(index) + "\t\t" + aCd.getArtist().get(index) + "\t\t" + aCd.getPrice().get(index));
    this.aCd = new CdList();
    public void sort()
    System.out.println("\t\t-== Alphabetised CD Titles ==--\n");
    Collections.sort(aCd.getTitle());
    int size = aCd.getTitle().size();
    for ( int i = 0; i < size; i++ )
    System.out.println( "\t" + aCd.getTitle().get(i));
    this.aCd = new CdList();
    public void exit()
    System.out.println("\nSystem shutting down...");
    System.exit(0);
    * Write a description of class CdList here.
    * @author (your name)
    * @version (a version number or a date)
    import java.util.*;
    public class CdList
    //instance variables
    private ArrayList<String> title;
    private ArrayList<String> artist;
    private ArrayList<Double> price;
    public CdList()
    //create instances
    title = new ArrayList<String>();
    artist = new ArrayList<String>();
    price = new ArrayList<Double>();
    //populate arrays
    //add titles
    title.add("Boom Boom Pow");
    title.add("Summertime");
    title.add("Number 1");
    title.add("Shake It");
    title.add("The Climb");
    title.add("Not Fair");
    title.add("Love Story");
    title.add("Just Dance");
    title.add("Poker Face");
    title.add("Right Round");
    title.add("Dance Wiv Me");
    title.add("I'm Not Alone");
    title.add("Hot 'n' Cold");
    title.add("Viva La Vida");
    title.add("Heartless");
    //HEX codes
    artist.add("Black Eyed Peas");
    artist.add("Will Smith");
    artist.add("Tinchy Stryder");
    artist.add("Metro Station");
    artist.add("Miley Cyrus");
    artist.add("Lily Allen");
    artist.add("Taylor Swift");
    artist.add("Lady GaGa");
    artist.add("Lady GaGa");
    artist.add("Flo Rida");
    artist.add("Dizzee Rascal");
    artist.add("Calvin Harris");
    artist.add("Katy Perry");
    artist.add("ColdPlay");
    artist.add("Kanye West");
    //RGB Co-ods
    price.add(0.99);
    price.add(0.75);
    price.add(1.99);
    price.add(2.99);
    price.add(2.99);
    price.add(0.55);
    price.add(2.75);
    price.add(1.98);
    price.add(1.25);
    price.add(1.55);
    price.add(0.99);
    price.add(2.55);
    price.add(0.55);
    price.add(1.99);
    price.add(0.99);
    } //end of constructor
    public ArrayList<String> getTitle()
    return ( title );
    } //end method
    public ArrayList<String> getArtist()
    return ( artist );
    }//end method
    public ArrayList<Double> getPrice()
    return ( price );
    }//end method

    It sounds like you are having Scanner woes. Remember that the call:
    select = input.nextInt();Reads the number inputted but not the rest of the line (the enter). Then the next call to readLine will read this.
    Suggestion: do this, to read a number:
    select = input.nextInt();
    String restOfLine =input.nextLine(); //discard

Maybe you are looking for