How to use my findTheHighest method to find the highest value in my two dim

I am going to create a 13row by 10 colume two dimensional array.
how to use my findTheHighest method to find the highest value in my two dimensional array.
.When i compile this program , i got those as following;
"Exception in thread "main" java.lang.ArrayIndexOutOfBoundsExce
at TaxEvolution.findTheHighest(TaxEvolution.java:31)
at TaxEvolutionClient.main(TaxEvolutionClient.java:25)"
public class TaxEvolution{
public double[][] salesTaxRates;
public TaxEvolution()
  salesTaxRates = new double[13][10];
  fillProvinTaxRates();
private void fillProvinTaxRates()
  for ( int row = 0; row < salesTaxRates.length; row++ )
    for ( int column = 0; column < salesTaxRates[row].length; column++ )
      salesTaxRates[row][column]= (int)(Math.random()*5000) + 1;
public double findTheHighest()
    double highest = salesTaxRates[0][0];
    for ( int row = 0; row <= salesTaxRates.length; row++ )
      for ( int column = 0; column <= salesTaxRates[row].length; column++ )
         if ( salesTaxRates[row][column] >= highest )
               highest = salesTaxRates[row][column];
    return highest;   
public double[][] arrayTaxEvolution()
  double[][] returnTaxRates = new double[13][10];
  for ( int row = 0; row < salesTaxRates.length; row++ )
    for ( int column = 0; column < salesTaxRates[row].length; column++ )
      returnTaxRates = salesTaxRates;
  return returnTaxRates;
public class TaxEvolutionClient{
public static void main( String[] args ){
  TaxEvolution protaxRateList = new TaxEvolution();
  double[][] taxRateList = protaxRateList.arrayTaxEvolution();
    for ( int i = 0; i < taxRateList.length; i++ )
      for ( int j = 0; j < taxRateList[0].length; j++ )
        System.out.print( taxRateList[i][j] + "\t" );               
        System.out.print( protaxRateList.findTheHighest + "\t" );
}

Multiposted
http://forum.java.sun.com/thread.jspa?threadID=699057&tstart=0

Similar Messages

  • Suggest the best method to find the duplicate values entry in the form

    Hi,
    Can u plz suggest a best logic for duplicate checking in forms while entering the data.
    for e.g when we enter empno,empname,sal etc.. details in a base table block,
    empname should not be duplicate. For this purpose for each entry of empname, I am using the logic in such a way that
    it will check from first record to last record in the loop. If entered empname already exists in the block it shows the error message.
    for this purpose I use the system variable system.cursor_record, Name_in function etc..
    But in the case of thousands or lacks of record in the form, Is this logic useful?? Plz suggest a best logic if you have?
    with thanks
    gms

    Hello,
    <p>Here is one solution</p>
    Francois

  • HOW WE CAN DO TRIAL AND ERROR METHOD TO FIND THE TABLES AND FIELDS?

    HOW WE CAN DO TRIAL AND ERROR METHOD TO FIND THE TABLES AND FIELDS FOR ENHANCING THE AUTOMATIC SERIAL NUMBER PROFILE///

    Hi
    You can find user-exit for that. In user exit function you can use all import parameter. Set debugging in include program and you can see all import parameter.
    Regards,
    M Sajid

  • I'm new to using iCloud and couldn't find the answer to: how to set my calendar to use the 24 hour clock. Thanks all.

    ?? I'm new to using iCloud and couldn't find the answer to: how to set my calendar to use the 24 hour clock. Thanks all.

    Thanks, David.  i thought i had it set correctly in Preferences in L&R. Being i was wearing my suspenders and belt at the same time i went back to L&R, cleared what was there and re-entered same to include unchecking and rechecking Time Format fgor 24-hour time.   It works now. Thanks again.

  • How to use singloeton factory methods ?

    Hi Guys,
    Can any one   please help me like how to use singleton factory  methods in oops? i am very new to  OOPS concepts ?
    Thanks in advance

    PRINTER - part2
      METHOD constructor.
        "initial printer cartridge fill
        me->number = i_number.
        me->cartridge = i_units.
        me->cost = me->cartridge * 10.
      ENDMETHOD.                  
      METHOD increase_cost.
        cost = cost + i_units.
      ENDMETHOD.                   
      METHOD consume_cartrigde.
        cartridge = cartridge - i_units.
      ENDMETHOD.                   
      METHOD get_total_cost.
        DATA lo_printer TYPE REF TO lcl_printer.
        LOOP AT it_printers INTO lo_printer.
          r_cost = r_cost + lo_printer->get_cost( ).
        ENDLOOP.
      ENDMETHOD.                 
      METHOD get_cost.
        r_cost = cost.
      ENDMETHOD.                
      METHOD get_cartridge.
        r_cartridge = cartridge.
      ENDMETHOD.                   
      METHOD get_number.
        r_number = number.
      ENDMETHOD.                  
    * helper method to show current state of printers
      METHOD show_printers.
        DATA lv_mess   TYPE string.
        DATA lv_number TYPE i.
        DATA lv_cartridge  TYPE i.
        DATA lv_cartridge_c TYPE c LENGTH 5.
        DATA lv_cost TYPE i.
        DATA lv_cost_c TYPE c LENGTH 5.
        DATA lv_number_c TYPE c LENGTH 2.
        DATA lo_printer TYPE REF TO lcl_printer.
        LOOP AT it_printers INTO lo_printer.
          lv_number_c = lv_number = lo_printer->get_number( ).
          lv_cost_c = lv_cost  = lo_printer->get_cost( ).
          lv_cartridge_c = lv_cartridge = lo_printer->get_cartridge( ).
          CONCATENATE lv_mess 'Printer:' lv_number_c ', cost:' lv_cost_c ', cartridge:' lv_cartridge_c
                      cl_abap_char_utilities=>cr_lf INTO lv_mess SEPARATED BY space.
        ENDLOOP.
        MESSAGE lv_mess TYPE 'I'.
      ENDMETHOD.                   
    ENDCLASS.  
    CLIENT
    DATA go_printer  TYPE REF TO lcl_printer. "printers
    DATA go_job TYPE REF TO lcl_job.          "job
    DATA  gv_mess TYPE string.
    DATA: gv_number TYPE i,
          gv_number_c TYPE c LENGTH 10.
    SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME.
    PARAMETERS: pa_print  TYPE i OBLIGATORY, "printer number
                pa_units TYPE i DEFAULT 100. "initial printer filling
    SELECTION-SCREEN PUSHBUTTON /10(15) addp  USER-COMMAND fcadd  VISIBLE LENGTH 15.
    SELECTION-SCREEN PUSHBUTTON /10(15) refil USER-COMMAND fcref  VISIBLE LENGTH 15.
    SELECTION-SCREEN PUSHBUTTON /10(15) show  USER-COMMAND fcshow VISIBLE LENGTH 15.
    SELECTION-SCREEN PUSHBUTTON /10(15) print USER-COMMAND fcprnt VISIBLE LENGTH 15.
    SELECTION-SCREEN PUSHBUTTON /10(15) total USER-COMMAND fctot  VISIBLE LENGTH 15.
    SELECTION-SCREEN END OF BLOCK bl1.
    SELECTION-SCREEN BEGIN OF BLOCK bl2 WITH FRAME.
    PARAMETERS: pa_col   TYPE c1,
                pa_pages TYPE i,
                pa_numb  TYPE i. "to which printer you want the job be send to
    SELECTION-SCREEN END OF BLOCK bl2.
    INITIALIZATION.
      addp = 'Add printer'.
      show = 'Show printers'.
      print = 'Print'.
      total = 'Total cost'.
      refil = 'Refill'.
    AT SELECTION-SCREEN.
      CLEAR: gv_number, gv_number_c, gv_mess.
      CASE sy-ucomm.
        WHEN 'FCADD'.
          go_printer = lcl_printer=>factory( i_number = pa_print
                                             i_units  = pa_units ).
        WHEN 'FCSHOW'.
          IF go_printer IS NOT BOUND.
            MESSAGE 'Add at least one printer first' TYPE 'E'.
          ELSE.
            go_printer->show_printers( ).
          ENDIF.
        WHEN 'FCPRNT'.
          IF pa_pages IS INITIAL.
            MESSAGE 'Provide number of pages' TYPE 'E'.
          ENDIF.
          CREATE OBJECT go_job EXPORTING i_pages = pa_pages i_color = pa_col.
          IF lcl_printer=>get_printer( pa_numb ) IS NOT BOUND.
            gv_number_c = pa_numb.
            condense gv_number_c.
            CONCATENATE 'Printer' gv_number_c 'doesn`t exist, select correct one' INTO gv_mess SEPARATED BY space.
            MESSAGE gv_mess TYPE 'E'.
          ELSE.
            go_printer->print( i_number = pa_numb
                               io_job   = go_job ).
          ENDIF.
        WHEN 'FCTOT'.
          IF go_printer IS BOUND.
            gv_number_c = gv_number = go_printer->get_total_cost( ).
          ENDIF.
          CONCATENATE 'Total cost of all printers for printing and initial cartridge filling is: ' gv_number_c INTO gv_mess
                      SEPARATED BY space.
          MESSAGE gv_mess TYPE 'I'.
        WHEN 'FCREF'.
          IF lcl_printer=>get_printer( pa_print ) IS NOT BOUND.
            gv_number_c = pa_print.
            CONCATENATE 'Printer doesn`t exist' gv_number_c INTO gv_mess SEPARATED BY space.
            MESSAGE gv_mess TYPE 'E'.
          ELSE.
            go_printer->fill_cartridge( i_number = pa_print
                                        i_units = pa_units ).
          ENDIF.
      ENDCASE.
    Regards
    Marcin

  • How to use super.finalize method?

    Hi,
    pls guide how to use super.finalise ( ) method ?
    Regards,
    Pavani

    http://www.janeg.ca/scjp/gc/finalize.html
    Armin

  • How to find the FND_PROFILE.VALUE(ORG_ID) in custom apex schema

    Hi,
    How to find the FND_PROFILE.VALUE('ORG_ID') from dual in custom schema......
    Actually I have integrated Apex 4.2 version with EBS r12
    select FND_PROFILE.VALUE('ORG_ID') from dual ; in apps schema I m getting 198 value
    but the same query(select  apps.FND_PROFILE.VALUE('ORG_ID') from dual ) in custom schema (XXCVBB) returning null value..
    Is there  any pre steps I have to do...
    kindly provide the useful inputs to retrieve the profile value..........
    Regards,
    Pavan

    Hi,
    fnd_profile.value('ORG_ID'); will fetch you value only if there is a organization assigned to any application [or only if its  a single Org], being it custom application you should have used set policy context or mo_global.init to populate the global temporary table which will hold all the Org's which that specific user has access too.
    in your custom code use MO_GLOBAL.SET_POLICY_CONTEXT('S','ORG ID WHICH YOU NEED TO SET');
    after setting the policy context, you should be able to see value from fnd_profile.value('ORG_ID');
    Hope this Helps!!
    MO_GLOBAL.SET_POLICY_CONTEXT
    This procedure has two parameters
    p_access_mode
    Pass a value "S" in case you want your current session to work against Single ORG_ID
    Pass a value of "M" in case you want your current session to work against multiple ORG_ID's
    p_org_id
    Only applicable if p_access_mode is passed value of "S"
    MO_GLOBAL.INIT
    Purpose of mo_global.init :-
    It will check if new Multi Org Security Profile is set, to decide if new Security Profile method will be used.
    If the new MO security profile is set, then mo_global.init inserts one record, for each Organization in Org Hierarchy, in table mo_glob_org_access_tmp
    Regards,
    Yuvaraj

  • How to find the RGB Values of a Color for Hyperion

    When customizing your Hyperion forms, we come across situations where we need the exact RGB value of a given color. This article explains a simple technique to find the RGB values using MS Paint and the Calculator applications that come as standard applications with your operating system.
    Here are the steps to find the exact RGB value of a given color.
    1) View your Hyperion form using IE, scroll down until you see the color you want to find the RGB value and press the "Print Screen" button (in your keyboard).
    2) Open MS Paint and click Edit -> Paste or simply Ctrl+V. What you saw in the browser will be copied as a new untitled image.
    3) Select the Color Picker tool and click on an area that has the color you want to match.
    4) Now go to Edit Colors... option and click on the "Define Custom Colors >>" button. The color you picked will be selected on this palette. At the bottom right hand corner you will see the Red, Green and Blue values you need. Note down the R,G,B values (given in decimal).
    5) Now we need to find out the hexa-decimal values that correspond to those decimal values. This is where we use the simple Calculator. Open the Calculator application from Program -> Accessories. Switch to the scientific mode by clicking View ->Scientific.
    6) By default it will be in the decimal number mode. Enter the R value (238 in this example) and click on the Hex radio button. The corresponding hexa-decimal value (EE in this case) will be shown in the dial.
    The selected color in this case has the same value for R, G and B. (In fact, all shades of gray has the same values for R, G and B.) Therefore, the RGB value of the background color that we need is #eeeeee. Repeat step 6 to find out the hex value for the Green and Blue elements, if they are different.
    Tip:
    If you find it difficult to pick a color, zoom the image by pressing Ctrl+PageDown or using View -> Zoom -> Custom... option.

    These tips are to find the RGB color of HFM default row where row is text and text lines in data columns are also visible to business users as Yellow as an input cell. By applying the same RGB color you can apply the same color to your data cells or rows. This post shows how to identify color from any web view-able object.
    Regards,
    Manaf

  • How do I find the closest value to a constant in an array

    I have an array of floating numbers and I want to find a value in that array that is closest to a floating constant.     For example if I have the array 5.9, 2.8, 3.7, 5.8, 6.9, and if I have the constant 5.4, how would I find the closest value to 5.4 in the array, which in this case would be 5.8. The only approach I can think of is to subtract each value in the array from 5.8 and find the minimum value of an array which would be created from the differences. Is there a better approach?
    Thank you.

    Just be sure to take the absolute value of the difference and your proposed method is fine.

  • How to use setFireActionForSubmit with parameters and capture the parameter

    Hi,
    Can anyone explain how to use setFireActionForSubmit.
    I am extending the Controller of ShoppingCartPG. In the extended controller processRequest method I am adding a button to the table and setting up the setFireActionForSubmit, so when the button is pressed it raises the event associated with the setFireActionForSubmit.
    I need to pass the RequisitionLineId as a parameter which is present in the VO associated with the ShoppingCartPG.
    I have used the following code in processRequest
    =================================
    public void processRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
    super.processRequest(paramOAPageContext, paramOAWebBean);
    OATableBean otbRN=(OATableBean)paramOAWebBean.findIndexedChildRecursive("ItemTableRN");
    OASubmitButtonBean oasb= (OASubmitButtonBean)paramOAPageContext.getWebBeanFactory().createWebBean(paramOAPageContext,"BUTTON_SUBMIT");
    oasb.setID("addnInfo");
    oasb.setUINodeName("addnInfo");
    oasb.setText("Additional Info");
    String pageName = paramOAPageContext.getRootRegionCode();
    Hashtable params = new Hashtable (1);
    params.put ("param1", pageName);
    Hashtable paramsWithBinds = new Hashtable(1);
    paramsWithBinds.put ("param2", new OADataBoundValueFireActionURL(oasb, "${oa.encrypt.current.RequisitionLineId}"));
    oasb.setFireActionForSubmit("addnInfoEvent",params,paramsWithBinds,false,false);
    otbRN.addIndexedChild(oasb);
    =================================
    And in processFormRequest method I am capturing the event "addnInfoEvent" and trying to capture the RequisitionLineId which I have passed it as a parameter.
    This is the code I have used in processFormRequest.
    =================================
    public void processFormRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
    super.processFormRequest(paramOAPageContext, paramOAWebBean);
    OAApplicationModule localOAApplicationModule = paramOAPageContext.getApplicationModule(paramOAWebBean);
    String strEvent= paramOAPageContext.getParameter(EVENT_PARAM) ;
    if ("addnInfoEvent".equals(strEvent))
    Number localNumber = 0;
    try {
    localNumber = new Integer(ClientUtil.getDecryptedParameter(paramOAPageContext, "param2"));
    catch (Exception e) {e.printStackTrace();}
    String outmsg="Line ID : " + localNumber + ":" + strEvent;
    throw new OAException(outmsg,OAException.INFORMATION);
    =================================
    But I am not able to capture the RequisitionLineId which I have sent as a parameter.
    Can anyone let me know what I am doing wrong.

    Hi,
    This is the requested HTML Code
    ===============================
    <button id="N3:addnInfo:0" class="x7g" style="background-image:url(/OA_HTML/cabo/images/swan/btn-bg1.gif)" onclick="return _chain('submitForm(\'DefaultFormName\',1,{\'param1\':\'${oa.encrypt.current.RequisitionLineId}\',\'serverValidate\':\'1\',\'param2\':\'${oa.encrypt.current.RequisitionLineId}\',event:\'addnInfoEvent\',source:\'N3:addnInfo:0\'});return false;',*'submitForm*(\'DefaultFormName\',1,{\'_FORM_SUBMIT_BUTTON\':\'N34\'});return false',this,event,true)" type="submit">Additional Info</button>
    ===============================
    Hi I am not able to paste the HTML Code..some parts of HTML gets removed automatically when I paste it in the forum.
    Regards,
    Rohit

  • How to find the nearlest value in 1-D array ?

    Hi.. everybody..
    I need to seperate the raw data(1-D) into 2 group of array by the center value and then make the average value in each array. But I also still have the problem about if the center value is not the same of some value in the 1-D array. I cannot use the split function.
    "How to find the nearlest value to the center point that I calculated, in the 1-D array ?"
    Thanks a lot for anybody help

    In a general sense, since I'm not sure what your data values are or how far away your calculated center is from the true value, I would do it one of two ways:
    1) Use a threshold value and scan the array until the threshold is reached (assumes constantly increasing values in the array).
    2) Use either a) round to nearest integer b) round to + Infinity (round up) or c) round to - infinity (round down). If you don't have decimal values, you'll have to devide the values by a power of 10.
    2006 Ultimate LabVIEW G-eek.

  • How to use a pull down menu after the 2.0 update

    Hi,
    I'm looking for help on how to use a pull down menu after the latest update. The method I was using before no longer works and it's driving me crazy.
    Has anyone else had this problem and figure out a new way?! 
    I was holding my finger down on the pull down menu and waiting for the options menu to pop up, I'd push cancel and the menu would stay. This no longer works.

    Also would love to know plz

  • How to find the ASCII value of '  ?

    how to find the ASCII value of ' using ASCII Function in SQL??
    while i am trying this using syntax ASCII(''') the query is terminating at the second one

    Lokanath Giri wrote:
    For your validation check this link
    http://www.techonthenet.com/ascii/chart.php
    Please don't just refer people to other non-oracle websites when the answer is so simple to give here as others have already done.

  • Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes? Both my daughters have ipods, my wife has one

    Dear All
    Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes. My daughters have a different generation 'nano' each & my wife a 'shuffle'?
    Many thanks

    Click here for options.
    (69081)

  • I recieved an Adobe Master Collection License number from my school (Stevens Institute of Technology) and I can't figure out how to use it in order to get the product. I've created a username and that's as far as I've gotten.

    I recieved an Adobe Master Collection License number from my school (Stevens Institute of Technology) and I can't figure out how to use it in order to get the product. I've created a username and that's as far as I've gotten. I need to download the product and I can't figure out where to begin.

    Ask someone at your school... Do you have a Cloud redemption code, or a CS6 serial number?
    If Cloud, Redemption Code http://helpx.adobe.com/x-productkb/global/redemption-code-help.html and
    http://www.adobe.com/products/creativecloud/faq.html
    http://helpx.adobe.com/creative-cloud/help/install-apps.html to install or uninstall
    http://forums.adobe.com/community/download_install_setup/creative_cloud_faq
    What it is http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html
    Cloud Getting Started https://helpx.adobe.com/creative-cloud.html
    If CS6, download at Other downloads and enter your serial number when prompted
    Again... your 1st resource is your school

Maybe you are looking for

  • Legend Position

    I'm creating a JSP pie chart in Reports 9i. The legend labels are being truncated. To fix this I increased the chart width using a "width=" tag. If I increase the width by 200 pixels, however, the legend box itself is moved to the right by 100 pixels

  • A question about DTR

    Hi Experts, I am Using NWDS 7.0.06 develop my  webdynpro project, now i want to set up a DTR Environment to version control my worksapce. Now i create a DTR client enter content like this: Client Name :      CompanyDTR DTR server URL: http://myportal

  • Is my BP-4L fake?

    I have bought a Nokia E72 a week ago believing my battery would last at least 3-4 days. However, I find that my battery stays full on the first day after full charge and then rapidly drops down to be depleted in the evening of the second day. My usag

  • Install Older versions with adobe cloud

    Hello, I have and adobe cloud plan. I need to install an older version of photoshop (CS5.5), because I have important plugins that doesn't work with CS6. How can I download and install photoshop CS 5.5? Is it possible to do that with my plan?

  • USEREXIT to update BSEG-BVTYP field through VF01 transaction

    Hi Folks ! I have a requirement where I have to update the Partner Bank Type(BSEG-BVTYP) field through the transction VF01. I tried with many exits like SDVFX008, RV60AFZC, RV60AFZZ and Includes like ZXVVFU01, ZXVVFU08, but unfortunately no results.