Need Clarification on the casting in Java

Here's the question,

class {Alien
String invade (short ships) {return 'a little' ;}}
Invade the string (... brief ships) {return 'a lot' ;}}
}
{Defender class
Public Shared Sub main (String [] args) {}
System.out.println (new Alien (.invade) (7));
}
}

The answer is the compilation fails because the 7 argument must be cast for short.

Now my doubt is that more short is 16 bits in Java, 7 can be stored in a variable short, why do we need to cast?
If someone can clarify it?

5.3 reading here:

http://Java.Sun.com/docs/books/JLS/second_edition/HTML/conversions.doc.html

The above explains why the narrowing conversions do not apply when choosing a method to call (from possible overloads).
What they don't say is why they do not have an exception for the literal arguments, like 7.
I guess that's for simplicity and consistency.

Tags: Java

Similar Questions

  • Need clarification on the ANSI joins

    Hi all

    I need some clarification on the ANSI join I am building to avoid an error when I try to run the same in standard join.

    With standard join, I get the error ORA-01417: a table can be external joined as another table.

    Regular join condition:
    Select null
    Of
    land_event_device_fraud dealer update,-T1
    land_event_device_upgrade T2, - New Subscriber first Set
    syn_intg_event_device_state T3, - subscribed existing
    land_event_device_upgrade T4 - new Subscriber Second Set
    WHERE T1.event_id = T2.event_id (+) AND T1.rate_plan_id = T2.rate_plan_id (+)
    AND T1.event_id = T3.event_id (+) AND T1.rate_plan_id = T3.rate_plan_id (+)
    AND T4.event_id = T1.event_id (+) AND T4.event_id = T1.rate_plan_id (+)
    AND T4.event_id = T3.event_id (+) AND T4.event_id = T3.rate_plan_id (+);

    -Get the error ORA-01417.

    Replaced the join above with ANSI join

    SELECT NULL
    OF land_event_device_fraud t1
    LEFT OUTER JOIN t2 land_event_device_upgrade
    WE (t1.event_id = t2.event_id AND t1.rate_plan_id = t2.rate_plan_id)
    LEFT OUTER JOIN syn_intg_event_device_state t3
    WE (t1.event_id = t3.event_id AND t1.rate_plan_id = t3.rate_plan_id).
    land_event_device_upgrade t4
    LEFT OUTER JOIN land_event_device_fraud t5
    WE (t4.event_id = t5.event_id AND t4.rate_plan_id = t5.rate_plan_id)
    LEFT OUTER JOIN syn_intg_event_device_state t6
    WE (t4.event_id = t6.event_id AND t4.rate_plan_id = t6.rate_plan_id);


    I want to know if the ANSI join is goig work properly or it will give me any Cartesian production information.

    Appreciate your help here.

    Thank you
    MK.

    Hello

    Maldini says:
    Hi all

    I need some clarification on the ANSI join I am building to avoid an error when I try to run the same in standard join.

    With standard join, I get the error ORA-01417: a table can be external joined as another table.

    Regular join condition:
    Select null
    Of
    land_event_device_fraud dealer update,-T1
    land_event_device_upgrade T2, - New Subscriber first Set
    syn_intg_event_device_state T3, - subscribed existing
    land_event_device_upgrade T4 - new Subscriber Second Set
    WHERE T1.event_id = T2.event_id (+) AND T1.rate_plan_id = T2.rate_plan_id (+)
    AND T1.event_id = T3.event_id (+) AND T1.rate_plan_id = T3.rate_plan_id (+)
    AND T4.event_id = T1.event_id (+) AND T4.event_id = T1.rate_plan_id (+)
    AND T4.event_id = T3.event_id (+) AND T4.event_id = T3.rate_plan_id (+);

    -Get the error ORA-01417.

    Replaced the join above with ANSI join

    SELECT NULL
    OF land_event_device_fraud t1
    LEFT OUTER JOIN t2 land_event_device_upgrade
    WE (t1.event_id = t2.event_id AND t1.rate_plan_id = t2.rate_plan_id)
    LEFT OUTER JOIN syn_intg_event_device_state t3
    WE (t1.event_id = t3.event_id AND t1.rate_plan_id = t3.rate_plan_id).
    land_event_device_upgrade t4
    LEFT OUTER JOIN land_event_device_fraud t5
    WE (t4.event_id = t5.event_id AND t4.rate_plan_id = t5.rate_plan_id)
    LEFT OUTER JOIN syn_intg_event_device_state t6
    WE (t4.event_id = t6.event_id AND t4.rate_plan_id = t6.rate_plan_id);

    You mix ANSI joins and the old joints. It's very confusing. Use all of one type or the other.
    >

    I want to know if the ANSI join is goig work properly or it will give me any Cartesian production information.

    What happens when try you it? Is it produces the results you want?

    Whenever you have any questions, post a small example of data (CREATE TABLE and INSERT statements) and the results desired from these data. Explain how you get these results from these data.
    Always tell what version of oracle you are using.
    See the FAQ forum {message identifier: = 9360002}

    Why the SELECT clause includes only NULL? Is that going to serve as an EXISTS subquery? If so, why bother to make the outer joins, and why do you care if it is a Cartesian product? What is the query to go for?
    For the purposes of debugging, you can include something that you see in the SELECT clause.

  • Need clarification on the explanation of size on a DVD

    Hi all

    I did a certain DVD so far with yet. Some are as short as 1 hour, some are as long as 2.5 hours. I continue to expect again to say "too video for the project"... but is not. I look at the menu "Generate" and he always says the same thing in 'disc info '.

    Here is a screenshot:

    Screen shot 2011-11-22 at 6.37.42 PM.png

    This project is of 2 hours 25 minutes. Is still somehow force on this 4 GB drive? Does this mean that certain quality will degrade? I bought a double disc burner layer thinking that soon I have to use it but so far I have burned projects that are big enough on my single layer.  Yet tell me when the project is too large for single layer?  Here is my system info:

    System: Mac OS X, version 10.6.8

    2.66 GHz Unknown processor

    Total physical memory: 8 GB

    Adobe still serial number: 976xxx

    Product version: 5.0.0.508

    First Media layer Version: -.

    Devices Blu - ray installed:

    None

    Installed DVD features:

    HL-DT-ST DVD - RW GA11N (Firmware KA19)

    Thank you guys!

    The answer will vary according to which challenge the material is (much higher than motion natures/low datarates needs movement), and the importance of quality is in your project.

    A rule of thumb is 2 hours is OK for a single layer, but some time at higher quality projects will be max on a disc single layer.

    And Yes, your 2 hours the project will be compressed to a high data rate (best quality) if still has two layers.

  • Need help with the coding of java base

    Hi I am new to java, please help me!

    Here the topic requires:

    circle2S.png

    • display the result of c1.contain (3.3)
    • C1. Contains (new Circle2D (4, 5, 8.5))
    • C1. Overlaps (new Circle2D (3, 5, 0.3))

    Here's my question:

    the circle contains must have (x, y, and radius)

    Why the contain (3.3) still work when there is no RADIUS?

    My code is correct?

    It's my circle2D code:

    public class Circle2D {}

    The center of the circle

    Private double x;

    Private double y;

    The RADIUS

    RADIUS double private;

    Constructor without parameters

    public Circle2D() {}

    This (0, 0, 3);

    }

    Constructor with x, y, and radius

    public Circle2D (double x, double y, double radius) {}

    This.x = x;

    This.y = y;

    This.RADIUS = RADIUS;

    }

    Get the zone method

    {} public double getArea()

    Return Math.PI * RADIUS * RADIUS;

    }

    Get the perimeter

    {} public double getPerimeter()

    return 2 * Math.PI * RADIUS;

    }

    Check if the point (X, Y) is in the circle

    public boolean contains (double X, double Y) {}

    If (Math.sqrt ((x-X) * (x - X) + (y - Y) * (y - Y)) < radius) {}

    Returns true;

    } else {}

    Returns false;

    }

    }

    Check if the new circle is the circle

    public boolean contains {(Circle2D circle)

    If (Math.sqrt ((x-circle.x) * (x - circle.x) + (y - circle.y) * (y - circle.y)) + circle.radius < radius) {}

    Returns true;

    } else {}

    Returns false;

    }

    }

    Check if the new circle overlaps the circle

    public boolean overlaps (circle Circle2D) {}

    If (Math.sqrt ((x-circle.x) * (x - circle.x) + (y - circle.y) * (y - circle.y)) + circle.radius > RADIUS)

    (& & Math.sqrt ((x-circle.x) * (x - circle.x) + (y - circle.y) * (y - circle.y)) + circle.radius < RADIUS + circle.radius) {}

    Returns true;

    } else {}

    Returns false;

    }

    }

    public static main (String [] args) {} Sub

    Circle2D c1 = new Circle2D (2, 2, 5.5);

    System.out.println (C1. Contains (3.3));

    }

    }

    I think you're confused by the abstraction.

    C1 is a Circle, a figure of dimension 2 covering an area. That's why he needs a RADIUS.

    The contains(x,y) of the method in the class circle valid a Point which is a figure without any Dimension. That is why the method does not have a RADIUS.

    Good bye

    DPT

  • Need clarification for the code below:

    Hi all

    On the one hand of my requiremnet, I found a solution that worked as expected... But I was not able to understand the logic... Can someone explain me the below
    the syntax what exactly the meaning for the code below:


    Code:

    SELECT NULL
    Of apex_application_page_ir_cond cond
    WHERE cond.application_id = v ('APP_ID')
    AND cond.page_id = v ('APP_PAGE_ID')
    AND cond.condition_type = 'filter '.
    AND cond.condition_enabled = 'yes '.
    AND cond.report_id = (SELECT report_id
    Of apex_application_page_ir_rpt
    WHERE application_id = v('APP_ID')
    AND page_id = v ('APP_PAGE_ID')
    AND application_user = v ('APP_USER')
    AND report_type = 'SESSION '.
    AND TO_CHAR (session_id) = v('SESSION')
    AND report_name IS NULL))


    For your refernec, I am attaching the link too
    URL: Re: Interactive_Report with the search only bar



    Thank you
    David...

    David,

    Two things. First, it makes it much easier if you put '{code}' (without quotes) around your SQL when you publish:

    SELECT rowid "EDIT", attr_code,ATTR_ATCL_CODE "Atcl Code", attr_description, attr_atcl_code,
                    attr_abbreviation,
                    attr_include_short_desc "Include short desc",
                    attr_include_long_desc "Include long desc",
                    attr_attr_type "AttrType", rowid "DELETE"
               FROM t_new WHERE EXISTS (SELECT 1 FROM APEX_APPLICATION_PAGE_IR_COND WHERE APPLICATION_ID = :APP_ID AND PAGE_ID = :APP_PAGE_ID AND CONDITION_ENABLED = 'Yes'
    AND APPLICATION_USER = :APP_USER) ORDER BY attr_description;
    

    If the spacing still needs work, it is a little easier to read.

    Second, your query exists clause checks just a State on, without checking the condition type. Without checking, I guess either APEX creates at least an inner State, or that your IR has a default condition on it (other than a filter). Try to add the constraint condition_type to your where clause to see if that solves it.

    Also, I noticed that you don't have additional code to get the report_id. It should not be necessary, because there are currently only supported for an IR by page, but you asked what are the differences.

    -David

  • Presario SR1400IL: need clarification in the motherboard for windows 7 Home basic system installation

    Dear support,

    We have a computer desk pc Compaq Celleron. Model No.Presario SR1400IL, Celeron 2.6 GHZ, 256 MB DDR RAM, 40 GB drive HARD, Motherborad MS - 6577, Version 4.1.This pc is having windows XP home operting system.

    We want to install windows 7 Home Basic Operating System.

    My question is that if this pc will support and install operating systems Windows 7 Home Basic Edition. We of the original licese of the Windows 7 operating system. We want to install Windows 7 Home basic System [operating system in Compqa Celleron computer.

    Please let me know that this pc will install and basic Windows 7 Home Edition support.

    Waiting for your reply at the earliest.

    Thanks in advance.

    Concerning

    Pradeep.

    It is not DDR3 or DDR2 even... it's the original DDR, just DDR PC2700 aka. PC3200 or DDR400 (same thing) also works

    One of the great debacle of recent years was when the industry was selling computers with 512 MB Vista. They have been slow and caused much of the poor reception for Vista. Windows 7 manages memory better than Vista and "work" on 512 megs, but there is nothing you want to try to use.

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

  • Need clarification on the calculation IF statement script

    Hello guys,.


    Usually in my other projects, I used IF statement while writing scripts of calculation by mentioning some members in the LHS and assigning certain values to this member on the RIGHT side. But rrecently in one of my projects, I came with a new typical script which involves the IF function.

    Please find the script calc which is present in the system already below. Inviting you to give some idea on what it executes.

    Consider that I have seven Dimensions called account, Time_Period, JOBS, management, Source, Centre, matrix.

    DIFFICULTY ("no job, Apr)

    Fix (@UDA ("Account", "allowance"))

    DIFFICULTY (@RELATIVE ('A domestic', 0), @RELATIVE("Source A",0), @LEVMBRS("Centre A",0))

    SET CREATENONMISSINGBLK

    "Ratio" of the size of the matrix

    (

    IF ("BegBalance->" no branch "->" no Centre "->" input "of the size of the matrix == 1")

    'Ratio'->' value Allocated ' account dimension;

    ELSEIF ("BegBalance"-> "no branch"-> "No Centre"->"Input" == 2)

    'Ratio'->'value UnAllocate' account dimension;

    ELSEIF ("BegBalance"-> "no branch"-> "no Center"-> "Input" == 5)

    'Ratio'->'value Midalloc' account dimension;

    ENDIF;

    ON THE OTHER

    #Missing;

    ENDIF;

    )

    Here in the above script, after the condition of the IF statement, they did not mention any LHS = 'Ratio'-> "value Allocated"; but directly affected 'Ratio '->' value Allocated '... This means it applies to anywhere in the cube?

    Please explain.

    It is attributed to "Ratio", because it is the Member that you opened a calco block for with:

    "Ratio" (...)

  • need clarification on the requirements for Adobe Acrobat Reader XI

    On the page, it says that these requirements are:

    Mac OS

    • Intel® processor
    • Mac OS X v10.6.4, v10.7.2 or v10.8
    • 1 GB of RAM
    • 350 MB of available disk space
    • screen resolution 1024 x 768
    • Safari 5.1 for Mac OS X 10.6.8 or v10.7.2; Safari for Mac OS X v10.8 5.2; Safari 6.0 for Mac OS X v10.7.4 or v10.8

    Now are these minimum specific condition, which would have been nice to have indicated on your site and it market with OS for example, 10.6.8 or what should I do if I never use Safari?

    I see you are using 10.6.8.  Unfortunately, it's now a non supported version of Mac OS X with the latest versions of Acrobat XI.

    11.0.11

    Support has dropped:

    • Mac OSX 10.6
    • Mac OS x 10.7
  • Need clarification on the export of an mxf with 8 audio channels Windows 7 first Pro CS 6.0.3

    I have read and followed the many discussions on this subject. I am grateful that the broadcaster has the patience to endure my test files. Yet once the broadcaster rejected my fifth test file, I am asking for help.

    I've set up a channel Master 8. Channel 1 is a frazzled left stereo mix. Channel 2 is a frazzled right stereo mix. Channel 7 is a copy of channel 1. Channel 8 is a copy of channel 2.

    The broadcaster said that there is no sound on channels 7 and 8, although I see these channels in my mixer as with audio. Posted you a screenshot of my setup of editing and mixing.

    Please tell me what I'm doing wrong. Thank you!

    Screenshot_1.PNG

    Bring your export in PP.  If you add to that a sequence and see audio 7 and 8, then the problem lies in the diffuser.  If you don't see not audio it, post back with a screenshot of your export settings.

  • Need Clarification on the deployment of customizations OFA

    Hi all

    I'm new to OAF and I have a question about the deployment of customizations in the OPS.

    The customizations are overwritten?

    If I make a change to the MyRequisitionsPG(for example), the MyRequisitionsPG.xml will contain the information together?

    As... Here is my scenario:

    I have a forum for production and two instances of development.

    The MyRequisitionsPG for the production and DEV1 are different.

    If I make changes to the DEV1 instance and deploy in my prod, how the page will look like? Will be my prod page crushed with all the other changes.

    MyRequisitionsPG (Prod) has a currency field.

    MyRequisitionsPG (DEV1) has date and currency fields.

    If I make changes to MyRequisitionsPG (DEV1) money on the ground and to deploy the Prod page, will be the date the field also comes in the prod?

    Thank you

    MyRequisitionsPG (DEV1) has date and currency fields.

    If I make changes to MyRequisitionsPG (DEV1) money on the ground and to deploy the Prod page, will be the date the field also comes in the prod?

    Yes, it will come to the Production instance as Dev1 page.xml is containing the date files and when you deploy that it will appear here.

    Thank you
    -Anil
    http://oracleanil.blogspot.com

  • Manager add-on said Java needs update, but the last Version already installed

    I have Java version SE7 U51 10.51.2.13 installed and works very well. Today, I 'upgraded' to 28.0 FF. Now Manager modules says Java is out of date, but when I go to the Java website, this is the latest version available. I downloaded the 32-bit and 64-bit versions in any case (even if I had already installed a month ago) and re-installed both. The FF Add-ons Manager always has the same caveat: "vulnerable species - Update now! Page Test in Java says I have the latest version, and it works.

    So what the devil?

    You can find the latest version of Java on Oracle's Web site.

    See the Platform Java > Java SE 8 (download the JRE 8)

    More quick is always download the full installer and uninstall the current version of Java before installing Java 8 version unless you need to keep the Java cache and downloaded applets.

  • I load the Version of Java Console 6.0.2.03 when Firefox says it must be installed, but never stays on my system. I need to reinstall.

    I have Java Console 6.0.01.03 and when I open Firefox it says I can install Version 6.0.02.03 so I say install. So when I turn off my machine and I go to Firefox it asks me to do it again.

    You are 18 updates behind in Java; your version 1.6.0_05. the current version is 1.6.0_23. See updating the guidelines under the heading "Other issues that need your attention".

    Disable Java Quick Starter: (start) > settings > Control Panel > Java, the Java Control Panel will open, click on Advanced tab, expand Miscellaneous, uncheck 'Java Quick Starter', exit Firefox, restart Firefox. If I remember correctly, you must perform it whenever you update Java.

    Other issues requiring your attention

    The information provided with your question indicates you have outdated plugins with known security and stability issues that need to be updated. To see the plugins submitted with your question, click on "+ system details...". "to the right of your original message of the question.

    1. Check your plugin versions: http://www.mozilla.com/en-US/plugincheck/

      • Note: plugin check page lacks information about all versions of the plugin
    2. Update of Adobe Reader (PDF plugin):
      • Within your existing Adobe (If you have already installed) drive:

    • Open the Adobe Reader program in your list of programs
    • Click Help > check for updates
    • Follow the instructions to update
    • If this method works for you, go to the section "download full installer ' below and go to"after the installation"below
  • Download the full installer (If you have NOT installed Adobe Reader):
    • "Use the links below in order to avoid the painful' getplus" Adobe Download Manager and other 'extras' you do not want
    • Use Firefox to download and SAVE the installer to your hard drive for the appropriate link below
    • Click "save to file"; Save to your desktop (so you can find it)
    • Once the download is complete, close Firefox
    • Click on the installation program, you just downloaded and allow installation to continue
      • Note: Vista and Win7 users need to right click on the installer and choose "Run as Administrator"
    • Download link: ftp://ftp.adobe.com/pub/adobe/reader/
      • Choose your operating system
      • Choose the latest version of # .x (example 9.x for version 9)
      • Choose the version the most recent number
        • NOTE: 10.x is the new Adobe Reader X (Windows and Mac only from this announcement)
      • Choose your language
      • Download the file
      • Windows: click on the .exe file. Mac: click on the .dmg file
  • Using one of the links below will force you to install the "getPlus" Adobe Download Manager. Also don't forget to uncheck the McAfee scanner if you do not want the link force installed on your desktop computer
  • After installation, launch Firefox and recheck your version.
  • Update the Java plugin to the latest version.
  • Hey I have windows 7 and a new coumputer. so when I got home I tried to download java and there is a dll error 1723 but its downloaded... but it won't let me get on the game make java needs although it is downloaded any idea? __

    idk what is happening on any idea?

    Hello

    Welcome to the Microsoft Vista answers Forum!

    I suggest you to follow these steps and check if it works because what this problem could occur if conflicts of software or compatibility issue.

    You will need to perform the compatibility check of software for the program installed on windows 7 on your computer.

     

    For this you need to follow the link below.

     

    http://www.Microsoft.com/Windows/compatibility/en-us/default.aspx

    Now, try to install the latest Java program on your computer and check for the issue because the java installed on the computer is incompatible with windows, I suggest you download and install the latest version.

    Follow this link provided below to install the latest java program.

    http://download.Java.NET/jdk6/

    Restart your computer and search for the issue.

     

    Thank you, and in what concerns:

    Aito - Microsoft technical support.

    Visit our http://social.answers.microsoft.com/Forums/en-US/answersfeedback/threads/ Microsoft answers feedback Forum and let us know what you think.

  • Need a Clarification on the installed component and run Simulator Configuration

    Help!

    I need clarification on what the plugin Eclipse is telling me. There are two parameters that are confusing me. For components installed (found under preferences/Window/BlackBerry JDE/Installed Components), I have a choice of 5.0.0 4.7.0,4.6.1, 4.6.0 4.5.0 and 4.3.0.

    Depending on which component I select when I go in the tab Configurations.../Simulator/course walk, I see a different mix of devices.  In all cases, there is a default Simulator.

    Initially, I assumed that each JDE component supports a mixture of different devices, and that is it compiled correctly, I would be assured that the app would work for all devices on the tab run Simulator Configuration.  In my tests, I found theopposite.  I also assume that, for each component of the JDE, there is a 'default' Simulator that was representative of all devices in the drop-down list run Configuration Simulator.  In my tests, am not sure what actually represents the Simulator 'by default'.

    Can someone clarify how to JDE and Configuration simulators run installed interact and a developer show how to ensure that their application is running on a mix of devices?

    When I finally get to the point where I am ready to deliver, what are the points of decision of installation?  Is it enough to simply require a specific version of an operating system (for example 4.7?) or do I have to create a grid and check the two model number and version of the operating system?

    Thanks for your help.

    "currentT shipping Curve 8330 come with OS 4.5" - they must be, as far as the carrier released a version 4.5.

    "Your statement that most consumers do not upgrade surprised me too" - only I support!  You might get a different opinion of someone else.  But the question is why would?  And our world app downloads indicate that he is did not upgraded phones out there.

    "I guess you are right in this assumption of statementI you are right in this statement"

    What is - an appropriate version of the BlackBerry JDE
    Article number: DB-00537
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800738/800901/What_Is...

    "If there is some Curve 8330 there running 4.5 OS, it's a configuration supported." - correct

    "Construction of the 4.3 OS will be one where the menu appears in the upper right and the built 4.5 OS will be one where the menu is out."  Sounds good

  • the resolution may not be cast in java.util.ArrayList

    I hava an accordion panel with this function in disclosureListener:

    {} public void terrababdelhak (DisclosureEvent disclosureEvent)

    System.out.println ("SHOW all THE NEWSPAPERS");

    int stateIndex [---]

    DCIteratorBinding dcLogs = (DCIteratorBinding) getBindings () .get ("LogTypesVO1Iterator");

    ViewObject voLogs = dcLogs.getViewObject ();

    List of JUCtrlListBinding = (JUCtrlListBinding) getBindings () .get ("LogTypesVO1");

    System.out.println ("LIST LOGS" + list);

    DCIteratorBinding iter = list.getDCIteratorBinding ();

    System.out.println ("ITER LOGS" + iter);

    RowSetIterator rsi = voLogs.createRowSetIterator (null);

    System.out.println ("RSI" + rsi);

    int i = 0;

    rowCount int = (int) voLogs.getEstimatedRowCount ();

    stateIndex = new int [rowCount];

    While (rsi.hasNext ()) {}

    System.out.println ("SEGUINTE!");

    Line nextRow = rsi.next ();

    iter.setCurrentRowWithKey (nextRow.getKey () .toStringFormat (true));

    INDX int = iter.getCurrentRowIndexInRange ();

    stateIndex [i] = indx;

    System.out.println ("Index loop-" + indx);

    i ++ ;

    }

    rsi.closeRowSetIterator ();

    System.out.println ("INDEX" + stateIndex);

    list.setSelectedIndices (stateIndex);

    System.out.println ("LISTA" + list);

    }

    Then I valuechangelister to selectmanycheckbox this function:

    {} public void filterLogs (ValueChangeEvent valueChangeEvent)

    Dc2 DCIteratorBinding = (DCIteratorBinding) evaluteEL ("#{bindings.") EntityLogsVO1Iterator}");

    ViewObject vo2 = dc2.getViewObject ();

    String WhereClause = "LOG_TYPE in (";"."

    System.out.println ("VALUE" + valueChangeEvent.getNewValue ());

    If (valueChangeEvent.getNewValue ()! = null) {}

    java.util.ArrayList selectedValues = (java.util.ArrayList) valueChangeEvent.getNewValue ();

    for (int i = 0; i < selectedValues.size (); i ++) {}

    If (!.) WhereClause.equals ("LOG_TYPE in (""))

    WhereClause += ', ';

    WhereClause += "'" + selectedValues.get (i) + "'";

    }

    WhereClause += ') ";

    VO2.setWhereClause (WhereClause);

    VO2. ExecuteQuery();

    } else {}

    WhereClause = "1 = 2";

    VO2.setWhereClause (WhereClause);

    VO2. ExecuteQuery();

    }

    }

    But when I uncheck a selectmanychoice point, cause this error:

    valueChangeListener = "#{backingBeanScope.backing_OrderDetail.filterLogs}": java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast in java.util.ArrayList.] "

    My selectmanycheckbox have this property:

    < af:selectManyCheckbox value = "#{bindings." LogTypesVO1.inputValue}.

    label = "#{bindings." LogTypesVO1.label}"id ="smc1.

    Simple Binding = "#{backingBeanScope.backing_OrderDetail.SMC1}" = 'true' "

    layout = "horizontal" autoSubmit = 'true '.

    valueChangeListener = "#{backingBeanScope.backing_OrderDetail.filterLogs}" >

    < f: selectItems value = "#{bindings." LogTypesVO1.items}"id ="si2 ".

    Binding="#{backingBeanScope.backing_OrderDetail.si2}"/ >

    < / af:selectManyCheckbox >

    my version of jdev is 11.2.4.0

    User

    You can not convert the ArrayList to direct object value

    java.util.ArrayList selectedValues = (java.util.ArrayList) valueChangeEvent.getNewValue ();

    write like this-

    ArrayList selectedValues = new ArrayList();

            Object [] str = (Object []) valueChangeEvent.getNewValue ();
            for (int i = 0; i)< str.length;="" i++)="" {="">
               

    System.out.println (STR [i]);

    selectedValues.add (str [i]); Add the values from an ArrayList

            }

    Ashish

Maybe you are looking for