How can i store values from my String into Array

Hi guys
i wants to store all the values from my string into an array,,,, after converting them into intergers,,,, how i can do this becs i have a peice of code which just give me a value of a character at time,,,,charat(2)...BUT i want to the values from String to store in an Array
here is my peice of code which i m using for 1 char at time
int[] ExampleArray2 = new int[24];
String tempci = "Battle of Midway";
for(int i=0;i>=tempci.length();i++)
int ascii = tempci.charAt(i); //Get ascii value for the first character.

public class d1
     public static final void main( String args[] )
          int[] ExampleArray2 = new int[24];
          String tempci = "Battle of Midway";
          for(int i=0;i<tempci.length();i++)
               int ascii = tempci.charAt(i);
               ExampleArray2=ascii;
          for(int i=0;i<ExampleArray2.length;i++)
               System.out.println(ExampleArray2[i]);

Similar Messages

  • How can I insert values from table object into a regular table

    I have a table named "ITEM", an object "T_ITEM_OBJ", a table object "ITEM_TBL" and a stored procedure as below.
    CREATE TABLE ITEM
    ITEMID VARCHAR2(10) NOT NULL,
    PRODUCTID VARCHAR2(10) NOT NULL,
    LISTPRICE NUMBER(10,2),
    UNITCOST NUMBER(10,2),
    SUPPLIER INTEGER,
    STATUS VARCHAR2(2),
    ATTR1 VARCHAR2(80),
    ATTR2 VARCHAR2(80),
    ATTR3 VARCHAR2(80),
    ATTR4 VARCHAR2(80),
    ATTR5 VARCHAR2(80)
    TYPE T_ITEM_OBJ AS OBJECT
    ITEMID VARCHAR2(10),
    PRODUCTID VARCHAR2(10),
    LISTPRICE NUMBER(10,2),
    UNITCOST NUMBER(10,2),
    SUPPLIER INTEGER,
    STATUS VARCHAR2(2),
    ATTR1 VARCHAR2(80),
    ATTR2 VARCHAR2(80),
    ATTR3 VARCHAR2(80),
    ATTR4 VARCHAR2(80),
    ATTR5 VARCHAR2(80)
    TYPE ITEM_TBL AS TABLE OF T_ITEM_OBJ;
    PROCEDURE InsertItemByObj(p_item_tbl IN ITEM_TBL, p_Count OUT PLS_INTEGER);
    When I pass values from my java code through JDBC to this store procedure, how can I insert values from the "p_item_tbl" table object into ITEM table?
    In the stored procedure, I wrote the code as below but it doesn't work at all even I can see values if I use something like p_item_tbl(1).itemid. How can I fix the problem?
    INSERT INTO ITEM
    ITEMID,
    PRODUCTID,
    LISTPRICE,
    UNITCOST,
    STATUS,
    SUPPLIER,
    ATTR1
    ) SELECT ITEMID, PRODUCTID, LISTPRICE,
    UNITCOST, STATUS, SUPPLIER, ATTR1
    FROM TABLE( CAST(p_item_tbl AS ITEM_TBL) ) it
    WHERE it.ITEMID != NULL;
    COMMIT;
    Also, how can I count the number of objects in the table object p_item_tbl? and how can I use whole-loop or for-loop to retrieve values from the table object?
    Thanks.

    Sigh. I answered this in your other How can I convert table object into table record format?.
    Please do not open multiple threads. It just confuses people and makes the trreads hard to follow. Also, please remember we are not Oracle employees, we are all volunteers here. We answer questions if we can, when we can. There is no SLA so please be patient.
    Thank you for your future co-operation.
    Cheers, APC

  • How to get a value from one item into another

    How can i get value from one item into another item.
    Ex: I have a report, in there i have check boxes, and when i have checked some rows, and press submitt, a prosses computates it into a item on another page, and a branche redirects to page 3. Then i'm going to use the value in the item into a PL/SQL script in an report to show the submittet items.
    How can i do this?
    Computation script, pages and all that is fixed. But i dont know which PL/SQL statement to use to get th value from the item.

    Hi Fredr1k,
    Use the V() function from pl/sql.
    e.g. V('P3_MY_ITEM')
    will return the value of that page item.
    As long as the pl/sql is called from within the Apex environment.
    Regards
    Michael

  • How can I get values from listbox?

    Hi all,
    I need to get price values from Price List (Inventory -> Item Master Data screen). It's important to get values from field 'Price' BEFORE item will be added/updated.
    How can I get values from Pricelist listbox?
    Thanks for any suggestions or short sample code.
    Best regards,
    Andy

    Hi Andy
    Here is som sample code that will get the description of the price list and also the price that is displaying at the time. The item master must be open for this snippet of code
      Public Sub GetItemPriceFromOpenWindow()
            'this is assuming item master is open
            Dim oEdit As SAPbouiCOM.EditText
            oEdit = SBO_Application.Forms.GetForm("150", 1).Items.Item("34").Specific
            SBO_Application.MessageBox(oEdit.Value)
            Dim oCmb As SAPbouiCOM.ComboBox
            oCmb = SBO_Application.Forms.GetForm("150", 1).Items.Item("24").Specific
            SBO_Application.MessageBox(oCmb.Selected.Description)
        End Sub
    Hope it helps

  • How can i store files from a PC on time capsule

    How can i store files from a PC on Time Capsule

    Actually although the format on the TC is not NTFS but Mac HFS+, that is irrelevant as far as windows is concerned. The TC offers SMB protocol to the network.. so how the TC stores the files is totally irrelevant.
    1. TC is by nature not particularly SMB happy..
    Change all names, TC and wireless to SMB compatible. Short, no spaces, pure alphanumeric.
    Turn on the guest account to read write access.. assuming you don't have security issues.
    Set the workgroup correctly.. don't use wins server.. no body does nowadays.
    Note short no space names.. guest access and workgroup all set.
    2. Download and install airport utility for windows or just bonjour for windows.. bonjour should be included with the full uitlity but that is not necessary.
    3. Just doing the above when bonjour loads it should bring up TC as accessible.. if not, or you need to access it manually.. open windows explorer and type in the address bar.
    \\TCName or \\TCIPaddress .. obviously replacing the generic name with the actual one used. In my case. as per the above screen shot. \\TCGen3
    You will then see the main root directory of the TC.. data or whatever it is named..
    Create a new directory under the root directory for your windows files.. and copy them there.
    Note .. some issues can arise if you are using the TC for TM backups.. Please keep a large enough amount of free space available that TM still works.. pondini recommends using disk images.
    http://pondini.org/TM/TCQ3.html
    As long as you still have plenty of free space this is not an issue but TM may have issues when it fills the drive as it is designed to do.

  • How can we handle dateformat from diff countries into india in bdc with out

    hi
    experts can u help me pz
    how can we handle dateformat from diff countries into india in bdc with out chnaging system parameters while uploading.
    i.e flatfile date is germanformat
         target date is indianformat.
    thanks and regords.

    use WRITE statement to format date.. along with extension ...
    DD/MM/YY
    or
    DD/MM/YYYY

  • How can I copy pictures from google images into MS word for iMac

    how can I copy pictures from google images into MS word for iMac.
    How can I copy pictures from iphoto to MS word for iMac.

    As MS Word is not an Apple product, you may do better posting in the MS forums:
    Office for Mac forums
    Most people find them very helpful

  • How can i store data from a pc to TC

    how can I backup data from a PC to TC

    Get a suitable backup software..
    Windows backup is of course useless. But you should already know that. It will not work on any version less than pro anyway.. due to MS deciding people with home versions should never use networks. ???
    That is why there is one million and one third party backup software that do work with network drives. Look up reviews of what works well. for the price you want to pay and get it.. Drive Image was a popular one. I must have a copy somewhere I bought .. then changed to Mac..
    There are plenty of free ones.. I do use macrium reflect.. does disk image only unless you pay the license.. but works super well.. particular for restore.. which people kind of forget.. the value of backup is how well does it restore.
    Use ethernet if possible.
    Note that mixing TM and data on the TC is not necessarily a great idea if you are also running Macs.

  • How can i get value from tilelist?

    I have created checkbox in itemRenderer that use for TileList
    How can i get value (checked) from checkbox?

    "Marsza" <[email protected]> wrote in
    message
    news:g6r6vj$di0$[email protected]..
    > Help me please....... T_T
    Could you rephrase the question?

  • How To Concatenate Column Values from Multiple Rows into a Single Column?

    How do I create a SQL query that will concatenate column values from multiple rows into a single column?
    Last First Code
    Lesand Danny 1
    Lesand Danny 2
    Lesand Danny 3
    Benedi Eric 7
    Benedi Eric 14
    Result should look like:
    Last First Codes
    Lesand Danny 1,2,3
    Benedi Eric 7,14
    Thanks,
    David Johnson

    Starting with Oracle 9i
    select last, first, substr(max(sys_connect_by_path(code,',')),2) codes
    from
    (select last, first, code, row_number() over(partition by last, first order by code) rn
    from a)
    connect by last = prior last and first = prior first and prior rn = rn -1
    start with rn = 1
    group by last, first
    LAST       FIRST      CODES                                                                                                                                                                                                  
    Lesand         Danny          1,2,3
    Benedi         Eric           7,14Regards
    Dmytro

  • How can i convert values in my string to ascii characters

    Hi guy.
    I am wrinting a code but i m stuck, I have a string with (Battle of Midway) in it, Now i want to convert each character in this string with the asci character,,,
    String temp = {"Battle of Midway"};
    so the ascii will be:
    B=66 a=97 t=116 l=108 e=101 o=111 f=102 M=77 i=105 d=100 w=119 y=121
    i found all these number for all the charachers, but i donno how to covert this string into ascii characerts... ofcurse i can do it one by one...but is there any class or method i can use for this,,,,, Once i convert all the character (from string) to ascii character THEN i have to convert it back from ascii to character,,
    Is anybody has any idea
    Thanks alot in Advance

    You get get the ascii code for those characters by doing something like:
    int ascii = str.charAt(0); //Get ascii value for the first character.
    Kaj

  • How can I retrieve values from integer array in sqlplus?

    I'm trying to write a query against OEM grid tables to come up with the result to show all scheduled backup jobs, in OEM grid, there is a table sysman.mgmt_job_schedule, one of the column DAYS is defined as TYPE SYSMAN.MGMT_JOB_INT_ARRAY AS VARRAY(5000) OF INTEGER,
    if I do select days from mgmt_job_schedule, it returns something like (2,3,4,5,,,,,,...), I want to retrieve the digits and translate them into Monday-Sunday in combination of other columns, but I'm new in varray, I don't know how can I retrieve the values in sqlplus, can you guys help me on that, My query is as follows, I got all the jobs I wanted already, just need to interpret on which day (week day) it is scheduled.
    Thanks
    select JOB_NAME, JOB_OWNER,job_type, mjs.START_TIME, DECODE(mjs.frequency_code,
    1, 'Once', 2, 'Interval', 3, 'Daily', 4, 'Weekly',
    5, 'Day of Month', 6, 'Day of Year', mjs.frequency_code) "FREQUENCY",
    mjs.days
    from mgmt_job mj, MGMT_JOB_SCHEDULE mjs
    where mj.SCHEDULE_ID=mjs.SCHEDULE_ID
    and mj.job_type='OSCommand'
    and mjs.Frequency_code in (3,4)
    and mj.is_library =0

    select job_name, job_owner, job_type, mjs.start_time,
               decode (
                    mjs.frequency_code,
                    1, 'Once',
                    2, 'Interval',
                    3, 'Daily',
                    4, 'Weekly',
                    5, 'Day of Month',
                    6, 'Day of Year',
                    mjs.frequency_code
                    "FREQUENCY", mjs.days, column_value
      from mgmt_job mj, mgmt_job_schedule mjs, table (nvl(days,sysman.mgmt_job_int_array(1,2,3,4,5,6,7)))
    where       mj.schedule_id = mjs.schedule_id
               and mj.job_type = 'OSCommand'
               and mjs.frequency_code in (3, 4)
               and mj.is_library = 0you may need to tweak the values in sysman.mgmt_job_int_array: use less or other values or simply put them null ....

  • How can I get values from a checkbox group?

    I have been developing a web application with Creator EA 2 and am trying to finish all the functionality before switching to 2. The last thing I have to do is pick up the status of checkboxes that I put in the page with the checkbox group component. Getting stuff from other fields is easy in the code for the page with a statement like: this.fieldname.getText() or ...getValue(). When you enter a line like this, Creator is helpful and gives you the completion choices. I tried some for the checkbox group, but none seem to give me what I want. What I want is the status ( true or false, 0 or 1, ...) for each checkbox in the group. I would appreciate advice on a simple way to get this. Thanks.

    You do not necessarily need to bind selected to an array. You might do that if you want to put the array in a session bean, but otherwise, the binding isn't necessary.
    Earlier, I provided a link to the Delving into Components tutorials. Here is an excerpt:
    "For the items property, you specify a display label and a return value. The selected value returns an array of objects of the same type as the return values. If you use a Default Options component to specify the items and return values, selected returns an array of String objects.
    The values in the selected array match the return values of the selected checkboxes."
    To illustrate, here is how to get the selected values without binding to an array. In this example, the id for the drop-down list is dropdown1.
        public void prerender() {
            if (checkboxGroup1.getSelected() != null) {
                String str="You selected ";
                String[] userSelections = (String[]) checkboxGroup1.getSelected();
                for (int i=0; i < userSelections.length; i++) {
                    str+= userSelections[i] + " ";
                staticText1.setText(str);
        }Hope this helps,
    Chris

  • How can I pass value from sql query to unix script

    I am new to oracle/unix.
    I want to write a simple script to find max date from a table and then pass date into a variable in a korn shell script.
    sql is select max(date) from table;
    how can I pass that value in unix shell as a variable. Thanks

    I use to code like this.
    Enjoy Scripting.
    cmd.sql
    select sysdate from dual;
    exit
    db.sh
    #! /usr/bin/ksh
    . ~oracle/.orapaths
    dbdate=$(sqlplus -S user/pwd@servicename @cmd.sql)
    echo $dbdate
    Run shell scripts
    ./db.sh
    SYSDATE --------- 19-JAN-07

  • How to take the values from a  String ( CSV   values).

    Hi All,
    I am passing csv String to a procedure as in parameter,but I have to take the values from a csv String one by one.Please let me know Is there any StringTokenizer function in oracle to take values like in java. Here is my javacode.
    import java.util.StringTokenizer;
    public class Sample {
         public static void main(String[] args) {
              String s="one,two,three,four,five";
              StringTokenizer stringTokenizer=new StringTokenizer(s,",");
              System.out.println( stringTokenizer.countTokens());
              System.out.println(stringTokenizer.hasMoreTokens());
              while(stringTokenizer.hasMoreTokens()){
                        System.out.print(stringTokenizer.nextToken());
    o/p: one two three four five

    Something based around one of these two methods should assist...
    select substr( the_string 
                  , decode( level, 1, 1, instr(the_string,',',1,level-1)+1)
                  , decode( instr(the_string,',',1,level), 0, length(the_string), instr(the_string,',',1,level) - decode( level, 1, 0, instr(the_string,',',1,level-1))-1)
                  ) the_value
                  from ( select '10,12,20,30,30,3,12,12,56' the_string
                         from dual
                  connect by level < length(replace(translate(the_string,'01234567890','00000000000'),'0')) + 2
    or
    SQL> select REGEXP_SUBSTR ('a,b,c,d,e', '[^,]+', 1, level) from dual connect by level<=5
      2  /
    REGEXP_SU
    a
    b
    c
    d
    e
    SQL>

Maybe you are looking for

  • IMAP messages not downloading to local folder?

    Hi. I've just switched from an iBook G4 to my new monster, MacBook Pro. However, I've run into a problem: I'm using an IMAP account in Mail, hence there was no problem getting all my emails to my new computer, as they were all located on the server.

  • Hello! i am trying to install adobe flash professional in my mac it will work?

    Hello! i am trying to install adobe flash professional to triy it 30 days in my mac! it will work in a mac?

  • Concurrent login in sharepoint

    Can anyone help me in understanding if there is a waysharepoint 2013 to stop same user from logging in from various machines/browsers/mobiles?

  • Move tables to new tablespace

    Hi, I have 2 tablespaces (a) DATA_TBS (b) INDEX_TBS So, i am going to create another DATA_TBS_1 Tablespace..and move the some smaller tables from DATA_TBS to DATAB_TBS_1 Tablespace... All the Tables Indexes are in INDEX_TBS...i am going to move only

  • Reg ORBTRC FILES IN WEBSPHERE

    HI , we are running the shell script which runs java programs, we are getting the result no problem , but it is generating the unwanted ORBTRC files we are using websphere application server. we donot want these orbtrc files. HOW CAN WE DISABLE THE F