Help me!! 2 dimensions array  - initialization

public class DotPlot_Student
     final static int SIZE = 10;               //Maximum length of the sequence
     static int [][] match = new int [SIZE][SIZE];
     static char [][] overlay = new char [SIZE][SIZE];
     static String xStr = "CCCAA";     //test 1
     static String yStr = "CCAAA";     //test 2
     static char x[] = new char [SIZE];
     static char y[] = new char [SIZE];
     //Sliding window size and stringency
     static int winSize = 3;
     static int stringency = 2;
     //Initilization of array
     private static void init()
          for (int i = 0; i < SIZE; i++)
               for (int j = 0; j < SIZE; j++)
                    //What is need to be initialized?
                    //at least 2 lines of code.
                    //can someone help me solve?
}

static int [][] match = new int [SIZE][SIZE];The array is already initialized, you don't need to do anything more.

Similar Messages

  • Initialize 2 dimensions arrays

    Hi everybody.
    Im using Oracle 11g, on Linux Centos.
    My problem is with 2 dimensions array.
    I have defined a type in the database in this way :
    create or replace
    TYPE ARRAY_N_12 is varray(12) of number;
    Now I try to do the next :
    create or replace
    procedure PRUEBA_INDEX as
      type xyzp is table of array_n_12 index by varchar2(5);
        XX xyzp ;
      I number;
      Z number;
    begin
       for I in -1 .. 100
       LOOP
       for Z in 1 .. 12
       LOOP
         XX(I)(Z) := i;
       end LOOP;
       end LOOP;
      and follow other commands.
    When I compile this it do it without errors. But when I try to run it it say me error :
    ORA-06531 , not initialized recompilation.
    I understand that I need initialized the array. But I dont find the way.
    If I do the next :
    xx xyzp := xyzp(); It say me no valid in this context.
    so I have been trying another ways but I dont find.
    Can anybody help me with this?.
    Thanks in advanced & regards.

    Mixing VARRAY and INDEX BY collection types doesn't make this any easier to follow.
    FOR i IN -1 .. 100 LOOP
       -- initialise element
       xx(i) := array_n_12();
       FOR z IN 1 .. 12 LOOP
          -- extend element
          xx(i).extend;
          -- assign element
          xx(i)(z) := i;
       END LOOP;
    END LOOP;

  • How can i declare 2 or more dimension array as function parameter???

    I am new to Objective-C and Cocoa. and now I have a problem.
    I want to send 2 dimension array to function but it cannot compile the error is "array type has incomplete element type" Please help me
    This is my Interface
    + (void) reValueInArray: (int[][] ) labelValue replaceValue: (int) oldValue withValue: (int) newValue;
    and one more question
    How can i get length of array
    1. array that declare as array at first (int a[5] for example)
    2. array that declare as pointer at first (int a* for example)
    Thank you Very much

    Satake wrote:
    a 2 dimension array is just an array of arrays correct?
    No. It isn't.
    so it'd be something like
    - (void)arrayManipulator:(NSArray *)aTwoDimensionArray;
    You're mixing metaphors. The original poster isn't using NSArray, but, rather, C arrays.
    + (void) reValueInArray: (int[][] ) labelValue replaceValue: (int) oldValue withValue: (int) newValue;
    In C, a multi-dimensional array is just one big, single-dimensioned array that uses fixed sizes for all but one of the component arrays to find a particular element. That means that you can't ever do something like:
    There are several workarounds.
    1) Use NSArray, as suggested in the first reply. That will solve this problem and lots more. With NSArray, you really an have arrays inside of arrays.
    2) Treat the array as just a plain old pointer in the function signature, then cast it back to the properly dimensioned array.
    3) Create a true array of arrays in C, using dynamic allocation. More trouble than it's worth.
    4...N) Other options that are probably more trouble than they're worth.

  • Two dimension array?

    Show me the code for two dimension array in JSP!
    Thanks in advance!

    Hi,
    I am new in Java but maybe I can help you:
    Two-dimnsional arrays you can declare in following way:
    String[][] someArray;
    When you want to allocate space for new array you can do something like this:
    someArray = new String[5][5];
    All Arrays have a data variable called length, which you can inspect to find out how many elements there are in the array.
    For multi-dimensional arrays, each dimension has a length property.
    int[] [] a1 = {{ 0, 1, 2 },{ 3, 4, 5 }};
    for (int i=0; i < a1.length; i++) {
    for (int j=0; j < a1.length; j++) {
    prt(i + "," + j + "=" + a1[i][j]);
    Hope this is of help to you.
    Mirkos

  • Matrix in  java using  two dimension array

    hi!
    Everybody here's a problem I have cpould any body out there give nice piece of sourcr code for "matrix in java using two dimension array"I have to give a presentation how it works.Yes I'd appreciate as many example as possible
    If anybody can??
    Please help
    regards
    ardent

    nice piece of sourcr
    code for "matrix in java using two dimension
    n arraySure,
    int[][] matrix = new int[5][5];
    That declares a two-dimensional 5 by 5 array with integer elements. All elements are initially 0.
    For further information check you favourite Java textbook.

  • 2 dimension array size error

    Hello,
    In attached file a exemple of my problem. I delete a 2 dimension array and display the size. I can notice in "size 2" (see the exemple") that the size is not at 0. Is It a normal behaviour?
    Thanks in advance, Daniel.
    Solved!
    Go to Solution.
    Attachments:
    ArraySize.vi ‏17 KB

    > So, there is no link between the display and the size array function
    I guess you are right - the display shows values - not memory allocation.
    One could make the case that it would be nice if the Delete from Array function was smart enough to realize that you just deleted the last of the array so why not get rid of any remaining rows/columns. On the other side of the coin, the Delete from Array function is not intended to be a Delete Array function and there may be performance issues on large arrays to add that functionality.
    To be honest, I was a bit puzzled by this until I saw the help documentation (i.e. rows or columns - not both). That's when I decided to check the array to see if it really was the size that was reported - and it was.
    You can also see this same functionality if you make an 2D array constant on the block diagram. Set values for the first column. Then right click and pick delete column. The array appears empty. Now enter a value in row zero, column zero. You will see that values for all of the rows you had previously set will be created. The memory for the rows was retained. 
     - very interesting find Daniel.
    steve
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.

  • 2-dimension array

    hi,JDC people.
    i want to use a 2-dimension array, the length of the first dimension is know, the length of the second dimension varies. how could i define and add elements to the array? shall i use ArrayList?
    can anyone give some hint or simple example? thanks.

    In Java, you don't (strictly speaking) have a two-dimensional array, you have an array of arrays.
    If you know the length of the first array (dimension), you can declare it thusly:Object[][] objectsArray = new Object[2][]; // You've declared and initialised one 'dimension';You can then declare each of the second arrays (dimensions) in turn:objectsArray[0] = new Object[5];
    objectsArray[1] = new Object[936];
    // etc.You then refer to each Object in the array(s), like this:Object something = objectsArray[0][3]; // Fourth object in first array
    Object somethingElse = objectsArray[1][935]; // 936th object in second arrayHope this is helpful...
    Chris.

  • Is it possible to make a 2D array (or whatever-dimension) array like..

    Is it possible to make a 2D array (or whatever-dimension) array like this...
            collumn 1                   collumn 2
    Emulated Address   Real Memory address*
               (int)                            (int *)
    +----------------------+----------------------------+
    |            0                |              0xA0               | <-- row 1
    |            1                |              0xA1               | <-- row 2
    |            2                |              0xA2               | <-- row 3
    +----------------------+----------------------------+
    * A = Address.
    is it possible to make an array like that?
    if it is, please tell me how to do it...
    thanks.
    ... I'm trying to make an emulator to emulate the simplest memory.

    Given your other posts, I'm assuming you mean in C, right?
    If so, the answer is yes, but specifically how will depend on a needed clarification of your question.  What you present doesn't really need to be a 2 dimensional array, just one: that looks like a simple list of memory addresses, right?
    At the simplest you can declare an array with two dimensions `iny myarray[2][3];` but to make the table you put up there you'd only need `int *myarray[3];`
    If you also wanted space allocated somewhere that each element of that list pointed to, you could allocate them separately:
    int *myarray[3];
    myarray[0] = (int *) malloc(sizeof(int));
    myarray[1] = (int *) malloc(sizeof(int));
    myarray[2] = (int *) malloc(sizeof(int));
    Obviously with many entries this should be in a loop.  Perhaps not as obviously, why would you not just malloc a larger block of memory to start with?
    What is the end goal?
    EDIT: actually, upon rereading your question, the mallocs are probably irrelevant.  `int *myarray[3]` will get you the array you are looking for.  Just realize that until you point those pointers to memory you 'own' you shouldn't assign to or read from them.
    Last edited by Trilby (2013-04-19 10:06:31)

  • Selecting one dimension of a two dimension array?

    hi, i want to select only one dimension of an array and put it into an arraylist (or casting the array verbatim into the arraylist)
    for example, here is an two dimension array:
    Object[][] data =
         {  { new Date(), "A", new Integer(1), Boolean.TRUE },
         { new Date(), "B", new Integer(2), Boolean.FALSE },
         { new Date(), "C", new Integer(9), Boolean.TRUE },
         { new Date(), "D", new Integer(4), Boolean.FALSE}
         };and i want to cast it into an arraylist, what i have in mind (a bit troublesome is the following:)
    ArrayList dataArray = new ArrayList();
    dataArray.add(data[0]);
    dataArray.add(data[1]);
    dataArray.add(data[2]);
    dataArray.add(data[3]);
    System.out.println(dataArray);when come upon the last System.out.println, i got some seemly useless addresses:
    [[Ljava.lang.Object;@f73c1, [Ljava.lang.Object;@789144, [Ljava.lang.Object;@1893efe, [Ljava.lang.Object;@186c6b2]
    how do you accomplish casting a two dimension array into an arraylist, but the second dimension of the arraylist is kept as Array of Objects? thanks alot!

    First, the strings that are printed out are the value of the hashcode for the specific object. That is the default value that is printed out for any object reference in a class that inherits the toString() method from the Object class. This is true for arrays. Your ArrayList contains array references in it..
    So, you are printing the object hashcodes for the arrays in your ArrayList, instead of the contents of those arrays. It would be better if you created ArrayLists, or even designed an object that stores your data, and stored those inside your ArrayList. ArrayList has an overwritten toString() method that will print the contents instead of the object hashcode, so an ArrayList containing ArrayLists would print your data the way you want. If you define your own class, you will need to provide a toString() method that prints the contents the way you want.
    PS, look at http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#toString() for more information on the toString() method used by ArrayList.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Help - Dell 8300 Dimension Soundcard driver

    +\ok, i have?this old Pc Dell 8300 Dimension. I recently upgraded my os to 32bits-win7 and it's working great except i have no sound. I went to dell driver site to download the creative lab - sound blaster driver but? it was only for xp. I tried with that xp driver but it didn't work. Any suggestions?! Any help will be appreciated! Thanks!

    /Re: Help - Dell 8300 Dimension Soundcard driver<Well there is no for the Li've! in Vista and of course windows 7, but I have one that works in Vista and has to be worth a try in Win7 as the sound card drivers are very similar.
    Have a look [url="http://www.filefront.com/0960626/SBL_VTDRV_LB_2_0_000A.exe/">here[/url].
    SB Li've! series Vista Support Pack Created by daniel_k
    This pack Supports all Li've! cards with a Hardware EMU0K DSP chipset (OEM / Retail models):
    - Li've! PCI52 / 4. / Value / Player / MP3+ / X-Gamer / Platinum
    - Li've! 5. MP3+ / X-Gamer / Digital / Platinum
    Does NOT support the following OEM / Retail models:
    - Host / software-based cards including Li've! 24-bit
    - any external Li've! soundcards
    NOTE: May have issues with more than 2 gigs of ram in Vista

  • How to print out the position of 2 dimension arrays?

    there are 2 dimension arrays, how can print out the position of value than 4?
    for example
    0 2 3 2 2 2
    0 1 1 2 5 3
    1 2 3 3 2 1
    print out:
    The pos is ( 5,2).

    Hello
    If I understand your question correctly, you are trying to print out the indexes where the value in your matrix is greater than 4
    If this is the case, then what you need to use is nested for loops e.g.
    for (int i = 0; i< array[0].length; i++)
    for (int j = 0; j< array[].length; j++)
    int value = array[i][j];
    if (value > 4)
    System.out.println("The pos is (" + i + "," + j + ")" );
    Regarding the syntax I have used to get the size of the array, I am not sure if this is correct, but you should have an idea of what I am doing.
    Sajid

  • Abstract  object array  initialization

    Hi everybody!
    I have a question, I know you can help me.
    I created an abstract class called publication, and two other clases called Tape and Book that derive from the publication class. Now, in the application I have :
    Publication BookTape[];
    when I compile my program I have one error which is that I haven't initialize the BookTape[] object array. My question is How I can initialize an object that comes from an abstract class? could you help me?
    Thank you !!!

    Publication bookTapes[] = new Publication[10];That will create your array (note, this has nothing to do with instantiating abstract classes).
    If you actually want to have something in your array, you need to fill it with subclasses of Publication since it's an abstract class.
    So.
    for(int i = 0;i < bookTapes.length;i++)
       bookTapes[i] = new SubclassOfPublication();

  • Help adding to an array

    Hello,
    I've added an Add button to a GUI. This feature should enable users to add itemName, numberUnitsStock, unitPrice, and itemNumber(one more than the previous last item). Can anyone help? I'm thinking that I need to extend the array size first and then figure a way to get the aforementioned included in the array. Any help would be greatly appreciated.
    public class DVD6
              protected int itemNumber; // item number
              protected String itemName; // name of product
              protected int numberUnitsStock; // number of units in stock
              protected double unitPrice; // price of each unit
            // constructor initializes DVD with int, String, and double as argument
            public DVD6 (int itemNumber, String itemName, int numberUnitsStock, double unitPrice)
            this.itemNumber = itemNumber; // initializes itemNumber
              this.itemName = itemName; // initializes itemName
              this.numberUnitsStock = numberUnitsStock; // initializes numberUnitsStock
              this.unitPrice = unitPrice; // initializes unitPrice
              } // end constructor
                // method to set the item number
              public void setitemNumber (int itemNumber)
              itemNumber = itemNumber; // store the item number
              } // end method setitemNumber
                // method to retrieve the item number
            public int getitemNumber()
            return itemNumber;
            } // end method getitemNumber
            // method to set the name of product
                public void setitemName (String itemName)
                itemName = itemName; // store the name of product
                } // end method setitemName   
                // method to retrieve the itemName
            public String getitemName()
            return itemName;
            } // end method getitemName
            // method to set the number of units in stock
                public void setnumberUnitsStock (int numberUnitsStock)
                numberUnitsStock = numberUnitsStock; // store the number of units in stock
                } // end method setnumberUnitsStock   
                // method to retrieve the number of units in stock
            public int getnumberUnitsStock()
            return numberUnitsStock;
            } // end method getnumberUnitsStock
            // method to set the price of each unit
                public void setunitPrice (double unitPrice)
                unitPrice = unitPrice; // store the price of each unit
                } // end method setunitPrice   
                // method to retrieve the price of each unit
            public double getunitPrice()
            return unitPrice;
            } // end method getunitPrice
                // method to retrieve the inventoryValue
                public double getinventoryValue()
                return (numberUnitsStock * unitPrice); // multiply numbers
                } // end method getinventoryValue   
                // method to get the value of entire inventory
                public static double getTotalValueOfAllInventory (DVD6 [] inv)
                   double tot = 0.0;
                     for (int i = 0; i < inv.length; i++)
                        tot += inv.getinventoryValue();
                   return tot;
              } // end method getTotalValueOfAllInventory
              public static DVD6[] sort(DVD6 [] inventory)
              DVD6 temp[] = new DVD6[1];
                   // sort
                   for (int j = 0; j < inventory.length - 1; j++)
                   for (int k = 0; k < inventory.length - 1; k++)
                        if (inventory[k].getitemName().compareToIgnoreCase(inventory[k+1].getitemName()) > 0 )
                             temp[0] = inventory[k];
                                  inventory[k] = inventory[k+1];
                                  inventory[k+1] = temp[0];
                             } // end if
                        } // end for
              } // end for
              return inventory;
              public String toString()
              StringBuffer sb = new StringBuffer();
                   sb.append("Item number: \t").append(itemNumber).append("\n");
                   sb.append("DVD Title: \t").append(itemName).append("\n");
                   sb.append("Units in stock: \t").append(numberUnitsStock).append("\n");
                   sb.append("Price of unit: \t").append(String.format("$%.2f%n", unitPrice));
                   sb.append("Inventory value of product: \t").append(String.format("$%.2f%n", getinventoryValue()));
                   return sb.toString();
    } // end class DVD6
    public class DVDs6 extends DVD6
        private String genre; // genre of DVD
          private double restockingFee; // percentage added to product's inventory value
           //constructor
         public DVDs6(String genre, int itemNumber, String itemName,
                     int numberUnitsStock, double unitPrice)
               super(itemNumber, itemName, numberUnitsStock, unitPrice);
              this.genre = genre;
         // method to set the genre of DVD
         public void setgenre (String genre)
         genre = genre; // store the genre
         } // end method setgenre
         // method to retrieve the genre
         public String getgenre()
         return genre;
         } // end method getgenre
         // method to retrieve the restockingFee
         public double getrestockingFee()
         return (super.getunitPrice() * 0.05);
         } // end method getrestockingFee   
         // Inventory value + restocking fee
         public double getinventoryValue()
            return super.getinventoryValue() + (super.getunitPrice() * 0.05);
         // String representation
         public String toString()
            StringBuffer sb = new StringBuffer();
              sb.append("DVD Genre:   \t").append(genre).append("\n");
              sb.append("Restocking fee:   \t").append(String.format("$%.2f%n", getrestockingFee()));
              sb.append(super.toString());
              return sb.toString();
    } // end class
    import java.awt.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.*;
    public class DVD6Test
         static int itemDisplay = 0; // ActionEvent variable 
         // main method begins execution of Java application  
       public static void main ( String args[] )
              double total = 0; // variable to get entire inventory value
              JPanel bttnJPanel; // panel to hold buttons
              JLabel label; // JLabel for company logo
              // instantiate object     
          final DVDs6[] a = new DVDs6[5];
          a[0] = new DVDs6("Action/Drama" , 041, "Rocky", 20, 15.00);
          a[1] = new DVDs6("Action" , 006, "Braveheart", 20, 20.00);
          a[2] = new DVDs6("Action" , 001, "Armageddon", 10, 10.00);
          a[3] = new DVDs6("Action" , 060, "Scarface", 15, 18.00);
          a[4] = new DVDs6("Action" , 021, "Goodfellas", 5, 15.00);
          DVDs6 temp[] = new DVDs6[1];
          // sort
          for (int j = 0; j < a.length - 1; j++)
             for (int k = 0; k < a.length - 1; k++)
                if (a[k].getitemName().compareToIgnoreCase(a[k+1].getitemName()) > 0 )
                   temp[0] = a[k];
                   a[k] = a[k+1];
                   a[k+1] = temp[0];
                } // end if
             } // end for
          } // end for
              // value of entire inventory
              for (int i = 0; i < a.length; i++)
                        total += a.getinventoryValue();
              // setup buttons
              JButton firstBtn = new JButton("First"); // button to display first inventory item
              JButton prevBtn = new JButton("Previous"); // button to display previous inventory item
              JButton nextBtn = new JButton("Next"); // button to display next inventory item
              JButton lastBtn = new JButton("Last"); // button to display last inventory item
              JButton addBtn = new JButton("Add"); // button to add item to inventory
              JButton delBtn = new JButton("Delete"); // button to delete item from inventory
              JButton modBtn = new JButton("Modify"); // button to modify DVD item
              JButton saveBtn = new JButton("Save"); // button to save inventory to a .dat file
              JButton srchBtn = new JButton("Search"); // button to search for item by name
              // create and setup panel to hold buttons
              bttnJPanel = new JPanel();
              bttnJPanel.setLayout(new GridLayout(1, 4));
              bttnJPanel.add(firstBtn);
              bttnJPanel.add(prevBtn);
              bttnJPanel.add(nextBtn);
              bttnJPanel.add(lastBtn);
              bttnJPanel.add(addBtn);
              bttnJPanel.add(delBtn);
              bttnJPanel.add(modBtn);
              bttnJPanel.add(saveBtn);
              bttnJPanel.add(srchBtn);
              //JLabel constructor
    Icon logo = new ImageIcon("C:/logo.jpg"); // load graphic
    label = new JLabel(logo); // create logo label
    label.setText("Java Solutions Inc."); // set company name          
              // text area and frame setup for product display
              final JTextArea textArea;      
              textArea = new JTextArea(a[0] + "\n");           
              textArea.append("\nValue of entire inventory: " + new java.text.DecimalFormat("$0.00").format(total) + "\n\n");
              textArea.setEditable(false); // uneditable text
              JFrame dvdFrame = new JFrame(); // JFrame container
              dvdFrame.setLayout(new BorderLayout()); // set layout
              dvdFrame.getContentPane().add(new JScrollPane(textArea), BorderLayout.CENTER); // add text area to frame
              dvdFrame.getContentPane().add(bttnJPanel, BorderLayout.SOUTH); // adds buttons to frame
              dvdFrame.getContentPane().add(label, BorderLayout.NORTH); // add company logo to JFrame
              dvdFrame.setTitle("DVD Inventory"); // title of frame
              dvdFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // terminate upon close
              dvdFrame.setSize(800, 575); // set size
              dvdFrame.setLocationRelativeTo(null); // set location
              dvdFrame.setVisible(true); // display the window     
         // inner class to handle button events
    firstBtn.addActionListener(new ActionListener() // register event handler
    public void actionPerformed(ActionEvent event) // process button event
    itemDisplay = 0;
    textArea.setText(a[itemDisplay] + "\n");
              prevBtn.addActionListener(new ActionListener() // register event handler
    public void actionPerformed(ActionEvent event) // process button event
                   --itemDisplay;
                        if (itemDisplay < 0)
                        itemDisplay = (itemDisplay + a.length) % a.length;
                        textArea.setText(a[itemDisplay]+"\n");
              nextBtn.addActionListener(new ActionListener() // register event handler
              public void actionPerformed(ActionEvent event) // process button event
                        itemDisplay++;
                        if (itemDisplay >= a.length)
                        itemDisplay = (itemDisplay) % a.length;
                        textArea.setText(a[itemDisplay]+"\n");     
              lastBtn.addActionListener(new ActionListener() // register event handler
              public void actionPerformed(ActionEvent event) // process button event
                   itemDisplay = a.length-1;
                        textArea.setText(a[itemDisplay]+"\n");
              addBtn.addActionListener(new ActionListener() // register event handler
              public void actionPerformed(ActionEvent event) // process button event
                        DVDs6[] as = new DVDs6[a.length + 1]; // increase array length
                        textArea.setText(new String());
         } // end method main          
    } // end class

    check this link,
    http://www.java2s.com/Tutorial/Java/0140__Collections/0160__ArrayList.htm
    U have lot of collections. always user like this
    List user=new ArrayList();
    user.add("username");
    This code helps u to make changes in future. In future, if u want to change from ArrayList to Vector then u can just easily make a modification like this.
    List user=new Vector();
    user.add("username");
    need to make changes only in the declaration part.

  • Need help on passing an array to  java routine from PL/SQL

    I got a math routine in java and the idea is have an array of integer and the java routine does some computatoin and then pass the array back to pl/sql
    and I google the web most code is calling pl/sql from java but not the other way round. any help will be really appreciated.
    {code}
    package tst;
    import java.util.*;
    public class plsql3 {
            private final static int factor1 = 2;
            public static void getFib2(int[] in, int[] out, int k){
                            for (int i=0;i<=k-1;i++){
                    out[i]= in[i] * factor1;
      public static void main(String[] arg){
         int[] in2 = {1,2,3,4,5};
         int[] out2= {0,0,0,0,0};
         getFib2(in2,out2,2);
         for ( int j = 0 ; j <= out2.length-1;j++) {
                    System.out.println(out2[j]);
    {code}
    {code}
    CREATE or replace PROCEDURE getfib5 (x IN OUT numlist, y IN OUT numlist, k in number)
    AS LANGUAGE JAVA
    NAME 'tst.plsql3.getFib2(int[], int[],int)';
    set serveroutput on format wraped;
    declare
      in2 numlist := numlist(1,2,3,4,5,6);
      out2 numlist := numlist(0,0,0,0,0,0);
    begin
    --in2(0) := 1;
    --in2(1) := 2;
    --in2(2) := 3 ;
    for i in 1..in2.count
      loop
        dbms_output.put_line(in2(i));
      end loop;
       for i in 1..in2.count
      loop
        dbms_output.put_line(out2(i));
      end loop;
      getFib5(in2,out2,2);
      for i in 1..in2.count
      loop
        dbms_output.put_line(in2(i));
      end loop;
       for i in 1..in2.count
      loop
        dbms_output.put_line(out2(i));
      end loop;
    --dbms_output.put_line(in2.count);
    end;
    {code}
    {code}
    javac -source 1.5 -target 1.5 tst/plsql3.java
    {code}
    Error report:
    ORA-00932: inconsistent datatypes: expected a value at argument position 1 that is convertible to a Java int got an Oracle named TYPE (ADT, REF etc)
    ORA-06512: at "TK1.GETFIB5", line 1
    ORA-06512: at line 18
    00932. 00000 -  "inconsistent datatypes: expected %s got %s"
    *Cause:   
    *Action:

    http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:3696816290928

  • Help with Structure in array

    I need to process a tab delimited list and I'm able to put the data into an array. See the image of the array below:
    Now that the list is separated into 5 array elements, each element is a list by itself.
    How can I create a structure for the list within each array element so I will have an Array with 5 element and each element contain a structure with keys and values???
    To create the above array I simply use :
    <cffile action="READ" file="#FeedPath##FileName#" variable="MyFile">
    <cfset MyArray = listtoarray(MyFile,"#chr(13)##chr(10)#")>
    Please help!

    alecken wrote:
    So I guess in you example, I don't quite undertand what should I do with the somePartOf(MyArray[i]
    Well "somePartOf(myArray[i])" was vague, because I had no idea how you wanted to parse up your data into a structure.  The previous post gives some idea how you want to parse it up, but there are still chalanges you will have to work out because it is your data.  You could easily treat the value as a space delimited list, but you do not seem to have a one to one relationship between space separated values and your desired structure keys.  You will have to work out the business rules that turns that data into the structure you desire.  There is no magic "Make My Random Data into a Structure" function.
    These would apply to the first two keys you described, but I have no idea how the rest of the data parses out.
    <cfset myArray2[i]["id"] = listFirst(myArray[i]," ")>
    <cfset myArray2[i]["addressType"] = listGetAt(2,myArray," ")>

Maybe you are looking for

  • PL/SQL

    Hi All, Database Version: 11.2.0.3.0 We have requirement below: From the java application one of our database procedure will be called, and one of the input parameter for the procedure is part_number and it can contain multiple values, so the java se

  • Why won't Habbo load completely on Firefox?

    Okay well, for the past 2 days, Habbo will not load completely while I'm on Firefox. The loading bar comes up and it begins to load, but it never finishes. Why is this happening? I've tried using other browsers and it the loading bar does finish load

  • HT5312 Please i want to change my security question but i forget the old answer

    I was forget my security question and when i want to change the rescue email i could't enter

  • Start Menu in Windows 10 Build 10041 not working

    20 minutes after the installation everything was fine and the start menu was working well. It has stopped all of a sudden now. Pressing start button as well now simply highlights the search bar and I have to rely on it to open all my apps. If anyone

  • Will Flash Catalyst help "me"?

    Flash Catalyst is supposed in bring developers and designers together. But I am one of those hybrids and does the devloping and designing. Usually I will create skins in Illustrator, then import skin artwork in flex, which auto generates the .css fil