value of the parameter

package Testen;

public class average
{
public double average (int zahlen)
{
System.out.println (Zahlen);
back numbers;
}


/**
*
@param args
*/
Public Shared Sub main (String [] args)
{
Average average = new Durchschnitt();
}
}

I would like to test a method with a parameter in JDeveloper10g
Where can I put in the value of the parameter "zahlen" before the race?

After running, I get the following messages:
[13: 55:04] successful compilation: 0 errors, 0 warnings.
Testen.Durchschnitt
Process has finished with exit code 0.

Argh so bad with this Java code, I almost give up ;)

Please do not use average so many times (class name, method name, but not a constructor, the variable name).

package Testen;

public class Durchschnitt
{
public double do(int zahlen)
{
System.out.println(zahlen);
return zahlen;
}

/**
*
* @param args
*/
public static void main(String[] args)
{
Durchschnitt d= new Durchschnitt();
double retval = d.do(**put your value for zahlen here**)
}
}

but so many uses of Durchshnitt make it so difficult to understand what you really want to do.

John

Tags: Java

Similar Questions

  • Data mining - error on the insertion of the TREE_TERM_MINPCT_MODE value in the parameter array

    Hello

    In Data mining when I tried to insert some values into the parameter array. I get the error by trying to introduce TREE_TERM_MINPCT_MODE in the table.

    The model who was on trial for create was decision tree.

    BEGIN

    INSERT INTO DT_CA_SETTINGS_TEST (SETTING_NAME, SETTING_VALUE) VALUES

    (dbms_data_mining. TREE_TERM_MINPCT_MODE, to_char (1));

    END;

    Error report:

    ORA-06550: line 3, column 22:

    PLS-00302: component 'TREE_TERM_MINPCT_MODE' must be declared.

    ORA-06550: line 3, column 22:

    PL/SQL: ORA-00984: column not allowed here

    ORA-06550: line 2, column 4:

    PL/SQL: SQL statement ignored

    06550 00000 - "line %s, column % s:\n%s".

    * Cause: Usually a PL/SQL compilation error.

    * Action:

    Thank you
    Srikanth.

    Hello

    BEGIN

    INSERT INTO DT_CA_SETTINGS_TEST (SETTING_NAME, SETTING_VALUE) VALUES

    (dbms_data_mining. TREE_TERM_MINPCT_NŒUD,to_char (1));

    END;

    This isn't 'Mode' his 'NŒUD '.

    Run now.

    See you soon...

  • How to write the condition with the value of the parameter

    Hello
    I'm working on siebel BI publisher report. I am able to display the value of the parameter in the report.

    Now, I wanted to do something logical based on the value of the parameter.

    for example: If the user changes the value of the parameter then I have to call A submodel if user don't past not any value then it should not display A submodel

    can someone tell me how to write that above logic?

    If the parameter exists then MODEL of APPEAL one another do not call MODEL A

    Kind regards
    JAG


    Dial a submodel

  • Display of a user name, but the sending in the value of the parameter username

    Hello

    I have a parameter named User and I need the column of user names from the drop-down list, but I need to send the value of username corrsponding to my settings. Please let me know if there is a way for this publisher of BI in.

    Thank you
    DY

    When you create a list of values for the parameter, your sql should have two columns in the select statement:

    Select user_name as name, user_id ID
    from table_name

    Name appears but user_id is returned. -Change the sql as required.

    Create the User_ID parameter (let's say it's ID), then use the created list.

    In your datamodel, you can filter by User_ID as: select * from table where user_id =: User_ID

    Hope that helps.
    Bipuser

  • Getting the value of the parameter

    Hello
    I use Reports6i.
    I have a parameterized report, say the parameter: P_nat, have the list of values as
    Select nat_code,nat_name from Nationality_Master;
    The values are as
     IND-Indian
     PAK- Pakisthani
     etc...
    in the query, I want the values like IND, PAK etc, so I take: P_nat.
    Report also I want to show the selected value of the parameter, but here, I want the values like Indian, Pakisthani etc... Take: P_nat gives only the code.
    Is it possible to get the value?

    Thank you

    Hello
    For a full description, create a user setting more (for ex: p_desc) and in the outbreak of the APRES-PARAMETRE-FORM reports, use the code below...

    SELECT nat_name
    INTO :p_desc
    FROM Nationality_Master
    WHERE nat_code = :p_nat;
    

    and in the layout of your reports, use the P_DESC parameter to display the full description.

    -Clément

  • How to get the value of the parameter to form of oracle from the html page

    Hello



    I want to know that is it possible to grab the value of the parameter of the html page and display on my oracle ACTIVE form.



    Kind regards
    Raza

    Pass the parameter in the HEART

    as

    hrtest/dev60cgi/ifcgi60.exe? Form=LOGIN_FORM_Para.FMX&width=1000&height=700&userid=123/123@test&otherparams=Pakistan=Allah ".

    Set a: PARAMETER. PAKISTAN on form

    and write after outbreak

    BEGIN
    If: PARAMETER. PAKISTAN = "ALLAH" then
    message ('HO ALLAH AKBAR');
    message ('HO ALLAH AKBAR');
    message(:Parameter.) PAKISTAN | ("AKBAR HO');
    message(:Parameter.) PAKISTAN | ("AKBAR HO');
    on the other
    message ("INSH' |: PARAMETER.") (PAKISTAN);
    message ("INSH' |: PARAMETER.") (PAKISTAN);
    end if;

    END;

    Kind regards

    Khurram Altaf

  • UDI-00014: invalid value for the parameter, "remap_tablespace".

    Hi all

    Windows 2003 Server
    Oracle 10g

    I'm doing a reorg, so I droped and recreated the schema. No w I want to import my datapump schema export, but it gives me an error:
    UDI-00014: invalid value for the parameter, "remap_tablespace".

    Here is my script:
    Impdp patterns of name of user and password = siebel directory = dpdir dumpfile = logfile schema_exp.dmp = schema_imp.log remap_tablespace = SBL_DATA:SBL_DATA, SBL_INDEX:SBL_INDEX State 60

    What I'm doing wrong, it makes me crazy, please help

    Published by: user11211037 on December 6, 2009 00:54

    Syntax and Description

    SCHEMAS = schema_name [,...]

    If you have the IMP_FULL_DATABASE role, you can use this parameter to perform a schema mode import by specifying one single schema other than your own or a list of schemas to import. First, schemas were created (if they do not already exist), including the system and the role of subsidies, the history of password and so on. Then all the objects contained in the imported patterns. Unprivileged users can only specify their own schemas. In this case, no information about the schema definition is imported, only the objects it contains.

    Hope you are clear.

    Concerning
    Asif Kabir

    -Mark your answer as correct/useful.

  • Need to display negative amounts, amounts positive based on the value of the parameter.

    Hi all

    I have a requirement in rdf as follows:

    I have two or three lines of the SELECT statement. An amount column having both negative and and postivie values.

    Based on the value of the parameter I need to take these records.

    Say, if the value of the parameter = "Credit amount", then I have to choose the records, the amount column value is negative.

    If the value of the parameter = "Debit amounts" then I have to choose the records, which the column value is positive.

    If the parameter Value = "All", then I must take all records, including both positive and negative.

    Please suggest how to achieve this scenario.

    Thank you
    Abdul

    In your where clause to add the following
    and ((& paramètre = "Débit" et montant > 0) or)
    (& parameter = 'Crédit' and the amount<0)>
    (& parameter = 'All'))

    Hope that answers your question
    Sandeep Gandhi
    Independent consultant
    513-325-9026.

  • ORA-06550 assign the value to the parameter

    Hi trying to assign the date quarter to a variable and get this error message, how can I assign a value to this parameter to PL/SQL:

    declare

    Neighborhood varchar (2);

    Start

    Select to_char (sysdate, 'YYYY-Q') in double shifts;

    dbms_output.put_line (Quarter);

    end;

    [Error] Execution (05:42): ORA-06550: line 2, column 42:

    PLS-00201: identifier 'vQUARTER' must be declared.

    ORA-06550: line 2, column 50:

    PL/SQL: ORA-00904: invalid identifier

    ORA-06550: line 2, column 3:

    PL/SQL: SQL statement ignored

    ORA-06550: line 3, column 26:

    PLS-00201: identifier 'vQUARTER' must be declared.

    ORA-06550: line 3, column 5:

    PL/SQL: Statement ignored

    your error message refers to vQUARTER, which is not listed in your code example.

    In addition, quarter is 2 characters such as defined in your code, but you ask to 6 characters in there, for example, 2016-1

  • problem with the default value of the parameter in function

    Hi all
    create or replace FUNCTION date_post_message (
    user_lock_in  IN  users.user_lock%TYPE,
    form_type_in  IN users.form_type%TYPE DEFAULT 0 ,
    date_in       IN                       DATE)
    RETURN BOOLEAN
    IS
    v_num number(1);
    BEGIN
    IF user_lock_in = 1 THEN
       RETURN FALSE;
    END IF;
    IF form_type_in NOT IN (1,2) THEN
       RETURN FALSE;
    END IF;
      SELECT 1
      INTO v_num
      FROM changes
      WHERE date_post_msg <= date_in ;
      RETURN TRUE;
    exception
    WHEN NO_DATA_FOUND THEN
    RETURN FALSE;
    END date_to_post_msg;
    problem: there is null, the function ignore the form_type_in default value 0.
    Why? the default value is valid only in the parameter of the procedure?
    Thanks to Advnaced
    Naama

    Naama wrote:
    If a value is null to convert it to 0? I mean in the part of the statement of the parameter

    No, can't do this in the signature. You will need to manage this by validating the parameters passed at the beginning of the function.

    It is quite simple. In your case, you might as well test for NULL and fail to function like this:

        FUNCTION date_post_message(
                user_lock_in IN NUMBER,
                form_type_in IN NUMBER DEFAULT 0 ,
                date_in      IN DATE)
            RETURN BOOLEAN
        IS
            v_num NUMBER(1);
        BEGIN
            dbms_output.put_line('Value of parameters : user_lock_in : '||user_lock_in || ' : form_type_in : '||form_type_in||' : date_in : '||date_in );
            IF user_lock_in = 1 THEN
                RETURN FALSE;
            END IF;
            IF form_type_in IS NULL THEN
                RETURN FALSE;
            ELSIF form_type_in NOT IN (1,2) THEN
                RETURN FALSE;
            END IF;
            RETURN TRUE;
        EXCEPTION
        WHEN NO_DATA_FOUND THEN
            RETURN FALSE;
        END;
    

    In other cases of use I would issue a local variable and treat it like this:

            IF form_type_in IS NULL THEN
                l_form_type := 0;
            ELSE
                 l_form_type := form_type_in;
            END IF;
    

    Of course, the code should use the local variable rather than the parameter.

    It is a good practice to validate values passed in parameters at the beginning of a function. If you really want to go to the city, discover the Design By Contract.

    Cheers, APC

    Published by: APC on November 9, 2011 13:36

    Example added, as requested by OP

  • How to display the value of the parameter in the xmlp layout

    Hi all

    1.) my rdf report that generates an xml (I m using to create the model of presentation xmlp) file takes some parameters.

    (2) rdf even generates also a PDF file that i'm using a pattern pre-determined XMLP design layout, this PDF shows also the values of the given parameters.

    3.) so that these settings are not available as a block of data or in the XML output.

    My question is how can I display the same settings in my layout xmlp or how can I get the element name for the parameter that are given when running simultaneous program values.


    Thank you
    Pratap

    At the beginning of the report, simply add these

    
    
    
    

    where p_PARAMETER1, p_start_date, and p_end_date are names of param simultaneous pgm
    and refer to them as

    
    
    
    
    
  • default value of the parameter date problematic SYSDATE

    Hello

    I finally discovered why a report of problems, but have no solution to the problem.

    After the first run of the report and MORE (DESKTOP is no problem), I can open is no longer the LOV for any of the settings. The LOV icon is available, but nothing happens when you click it.

    Now, I know the problem is a specific condition based on a date parameter.

    The State is testing a date field against a setting that is based on NONE and has a default value of today. If I use effective dates in the setting I have no problem. If I use today or SYSDATE, then I can only run the report once. After that I can't choose any LOV in any of the settings. If I change the today or SYSDATE to a real, date is well again.

    The State of origin that was used was based on a calculated field due2 defined as: DECODE (:due,'TODAY',SYSDATE,TO_DATE(:due,'DD/MM/YY'))

    I tried to change the condition of:

    date field < = TO_DATE(:due,'dd/mm/yyyy')

    but also causing problems if I used SYSDATE or today in the parameter.

    I then tried to change the calculated field to due2:
    Decode (:due,'TODAY',to_date(sysdate,'dd/mm/yyyy'),to_date(:due,'DD/mm/YY'))
    but it does not work.

    Any suggestions?

    Thank you.
    Leah

    Hi Lea,.
    Try using 'CASES' instead of 'Decode' in your state:

    -case when: due = trunc (sysdate) then 'Today'
    of other end TO_DATE(:due,'DD/MM/YY')

    Maybe it will solve your problem.

    Note that this is problematic, because if the user enters an invalid date you will probably get an error.

    I could do this a bit different...
    1. create an optional parameter based on the date (so that I'll have the calendar)
    2 create a condition where the parameter is empty, it will use SYSDATE.
    for example:
    =: due
    OR (: due is null AND = trunc (sysdate))

    Tamir

  • null value for the parameter in quesry

    Please help on this problem:

    I have a query like

    Select colA, colB
    from tableA
    where cola =: parameter;

    If: parameter has a value, then the request is ok for my pupposes,
    but when: parameter is null, then I have to choose only 3 values of colA. (ColA has more than 3 distinct values)

    I can't use nvl because there are 3 arguments and no 1.

    I tried:

    Select colA, colB
    from tableA
    where (: parameter is not null and colA =: parameter) or (: parameter is null and colA (1,2,3))

    but this isn't the solution.

    Can someone help me on this simple query?

    Your version must have worked as long as you have no other filter criteria in the where condition.
    Need you some parentheses around the OR condition. So I don't know what was the problem with your solution.
    BTW: There is a ') ' missing at the end, but I guess that it's just a typo while copying the code on the forum.

    The following alternative works:

    select colA, colB
    from tableA
    where colA in (nvl(:parameter,1) ,
                 nvl(:parameter,2) ,
                 nvl(:parameter,3)
                 ) ;
    

    Advantage: Can be faster in the case of null, because it can always use an index on the column of cola.

    Published by: Sven w. on April 13, 2010 15:26

  • Value of the parameter is not displayed when moving from page of the dialog box

    Hello

    The question I face, is that I have a backup button with the logic in the PFR in which I call a page of dialogue that has an OK button. I give the floor to press ok another page. I need to capture a XXParty parameter that I put in the CO LIC key but is not displayed in the central of the PR of the other page that is called when you press the OK button. Probably I'm missing something very small. Any help would be greatly appreciated. Thank you


    SAVE BUTTON controller LIC... (Call the dialog box and the parameter)
    =============================================
    If (SaveButton! = null)
    {am.invokeMethod ("addNotes", params);  Transaction record.
    System.out.println ("save backwards");
    Try to build your own Page of dialogue here...
    String MainUrl = "OA.jsp?page=xxksms/oracle/apps/imc/ksms/webui/ShipperOverviewPG & retainAM = Y;
    OAException descMesg = new OAException ("XXTSA", "XX_KSMS_SAVED_NOTES");
    OAException instrMesg = new OAException ("FND", "FND_CANCEL_ALERT");

    DialogPage OADialogPage = new OADialogPage (OAException.INFORMATION, descMesg, null, MainUrl, null);
    OK button to send back the values of the PartyID for CO of the ShipperOverview Page.
    System.out.println ("The party ID is" + left); It is displayed.
    dialogPage.setPostToCallingPage (true);
    java.util.Hashtable formParams = new java.util.Hashtable (1);
    formParams.put ("XXParty", out); Part definition ID in XXParty.
    dialogPage.setFormParameters (formParams);
    pageContext.redirectToDialogPage (dialogPage);


    Partial code in the process asks in the called ShipperOverview Page of the dialog box's OK button
    ====================================================
    super.processRequest (pageContext, webBean);
    Am = (OAApplicationModule) pageContext.getApplicationModule (webBean) OAApplicationModule;
    String XXId = pageContext.getParameter ("XXParty"); Try to recover part ID here of page of the dialog box.
    System.out.println ("The PartyID is" + XXId);

    Salvation;

    Try one of these two options.

    1. pass the value of the part directly in the URL & get it 2nd co:
    String MainUrl = 'OA.jsp?page=xxksms/oracle/apps/imc/ksms/webui/ShipperOverviewPG&retainAM=Y&XXParty="+Party;

    2. After selecting the button ok in the dialog box get the parameters in CO 1 himself then using URL forward, send them to CO 2

    If (SaveButton! = null)
    *{*
    * //Your code... *.
    *//..............*
    *//............*

    Default OAException = new OAException ("XXABCD", "XXABCD_GNO_DELETE_WARNING");
    DialogPage OADialogPage = new OADialogPage (OAException.WARNING, default, null, "","");
    dialogPage.setOkButtonItemName ("DeleteYesButton");
    dialogPage.setOkButtonToPost (true);
    dialogPage.setPostToCallingPage (true);
    String lineId = pageContext.getParameter ("lineId");
    Hashtable ht = new Hashtable();
    HT.put ("lineId", lineId);
    HT.put ('actor', actor);
    HT.put ("empId", empId);
    dialogPage.setFormParameters (ht);
    pageContext.redirectToDialogPage (dialogPage);

    *}*

    * combination else if (pageContext.getParameter ("DeleteYesButton")! = null) {*}
    String lineId = pageContext.getParameter ("lineId");
    String = pageContext.getParameter ("actor") actor;
    Var empId = pageContext.getParameter("empId");
    HashMap formParams = new HashMap (1);
    formParams.put ("lineId", lineId);
    formParams.put ('actor', actor);
    formParams.put ("empId", empId);
    pageContext.forwardImmediately ("OA.jsp?page=/xxx/oracle/apps/xxabcd/appraisal/webui/DrillDownPG",
    NULL, KEEP_MENU_CONTEXT,
    NULL, formParams, true,
    ADD_BREAD_CRUMB_NO);
    *}*

    --
    GsrC

  • How to disable a user interface messageCheckBox based on the value of the parameter system?

    Hello

    I implement a messageCheckBox on the UI, and I need, it is not not editable if a system parameter was set to Yes and editable if the defined system parameter or not. Is this feasible? The syntax to use? I think to put it in the field 'Disabled' for the checkBox control.

    Very much appreciate your comments.

    Thank you!

    Hi Michelle,

    What you mean by system setting. If is the value of say certain attribute VO should first read the value of the attribute of the VO.

    and create a transitional attribute in the same VO and set the property accordingly.

    The syntax is ${oa. VewInstanceName.ViewAttributeName}

    Thank you
    -Anil

Maybe you are looking for

  • I can't update my iPhone since the version 7.1.2 to 8.0 or later

    Hello I want to update my iPhone from 7.1.2 8.0 or later version. But it wont let me update! I tried it on iTunes and it says that my iPhone software is up to date, when I press 'Control upgrade' he says "this version of the iPhone (7.1.2) software i

  • Manual owners

    Just bought an HP pavillian 23g017c all-n-one pc where can I get the owners manual (have need chemo brain book in front of me)

  • My Windows 7 Professional cutting tool needs reloading

    I took my computer for maintenance and the capture tool has been removed. I searched all files and the secondary basket and it cannot be found. How can I download this tool? It is very important for me.

  • Removal of Documents after the Invocation is complete.

    Hi again! I need to show all kinds of Documents, since it would takes years to develop a full office suite, I thought it would be great to do just the same thing I do on Android and rely solely on existing applications to manage this problem. Unfortu

  • SMALL BUSINESS SWITCH SLM 2024

    Hi, for some reason, I can't access the switch through the web interface. I have the switch to factory settings, and the same thing happens. I tried to access the switch via a special pc and still the same, I would appreciate help on this.