Why it is not equal?

Integer i = new Integer (42);
Long l = new Long (42);
if(i.equals(1))
     System.out.println("Equal");
else
      System.out.println("NOT Equal");Why it is Not Equal?can you explain me?

When you do
i.equals(l) - equals method of the Integer class will be called.
and equals method in Integer class is like dis
public boolean equals(Object obj) {
     if (obj instanceof Integer) {
     //compare the two objects and return the result
     return false;
The two objects will be compared only if both of them are Integer types, other wise it will simply return false.
www.free-java-tutorials.com

Similar Messages

  • Why resource cost in Oracle does not equal the total on the routing of Usage.

    why resource cost in Oracle does not equal the total on the routing of Usage.

    Hi Judy,
    I could not reproduce your issue. Is your Project Server patched with the latest SP and CU?
    Also can you reproduce this unexpected behavior with another project?
    Can you split your screen from the resource usage view, display the resource form and click right on the grey part selecting "schedule"? Then you'll have the scheduled start and finish dates for the resource's assignments. This is to be sure that
    you are not missing any parts of the assignments due to a wrong zoom in the timephased grid.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • In a purchase order for 3 GR's Quantity does not equal the value

    Hi,
    I have found the difference in one purchase order, there have been 3 GRs where the Qty does not equal the Value.  How has this happened?
    Any guesses why the difference has come.
    Thanks&regards,
    Veena

    Hi Vishal,
    In po history for agt 3 Gr's  Quantity does not equal the values. I hope the difference is Movement types. But exactly where to check this movements i am not getting.
    Can you tell me this which T.code.
    Tx,

  • KE5Z drilldown report does not equal grr3 report values

    Hello,
    We have a grr3 report where the COGS line is based on functional area and account ranges.  The total displayed on the GRR3 report for the COGS cell matches the values I would expect based on the specified account and functional area restrictions assigned to that cell.  When I drill into the KE5Z report (Profit Center: Actual Line Items), which is identified as a receiver report, the summed value of the "In Company Code Currency" field does not equal what is displayed in GRR3.  The GRR3 report is returning results in the same currency as the company code currency that the report is being executed for so that is not the problem.  During my investigation it looks like the functional area restrictions are not being accounted for when I drill into KE5Z.  Any recommendations on why the restrictions identified for the cell in the GRR3 report would not be carried through to the KE5Z results?  I have been playing with this for hours and have run out of ideas.  I can't determine why the COGS cell value is different than the actual line items sum.  Any help would be greatly appreciated.
    Thanks,
    Jordan

    Hi Jordan,
    in my experience the report-report interface can only pass through selections independently.
    To give an example: I had a report painter report with line 1 that had a selection on two characteristics (say cost element A and cost center B) then a second line with selection cost element C and cost center D selected and finally a line with the sum of the two lines above.
    Now when I jump to a connected line item report by double-clicking on the line with the sum, the parameters passed on are:
    cost centers: B, D
    cost element: A, C
    Therefore, the sum of my line items is not equal to the sum that I departed from, as I get line items with cost element A and cost center D, for example, a combination that was excluded from my original report.
    I hope I made the point clear.
    Another possibility is of course, that the receiving report has additional selection active (in the form used in the dril down report) that were not present in the original report
    Regards
    Nikolas
    Edited by: Nikolas John on Mar 24, 2011 9:21 AM

  • Not Equal To Scenario

    Dear All,
    I have a scenario whereby I have same id with two values.
    Lets say TableA with two Columns - Field_id ,Value, Indicator
    and populated as
    1 x true
    1 y true
    Now, I want to return no rows if passed in value is either 'x' or 'y' for Not Equal to Condition.
    That is, select * from TableA where value != 'y' and field_id = 1; produces one row but I want no rows to be returned possibly with Case statement or similiar.
    In my scenario, the row with 'x' value is parent and 'y' is the child. So when I check for Not Equal To condition I need to automatically exclude the parent.
    Any help/ideas will be welcome and appreciated.
    Edited by: user7981199 on Sep 12, 2011 5:23 PM
    Edited by: user7981199 on Sep 12, 2011 5:24 PM

    user7981199 wrote:
    Dear All,
    I have a scenario whereby I have same id with two values.
    Lets say TableA with two Columns - Field_id ,Value, Indicator
    and populated as
    1 x true
    1 y true
    Now, I want to return no rows if passed in value is either 'x' or 'y' for Not Equal to Condition.
    That is, select * from TableA where value != 'y' and field_id = 1; produces one row but I want no rows to be returned possibly with Case statement or similiar.
    In my scenario, the row with 'x' value is parent and 'y' is the child. How or why Oracle RDBMS understand or implement this parent/child relationship?
    Include additional filter so that "parent" row is NOT returned.

  • Produciton order status TECO, but WIP is not equal to zero

    Dear Expert,
    In OKGC,
    1000     0     000002     REL     2     WIP Calculation on Basis of Actual Costs
    1000     0     000002     DLV     3     Cancel Data of WIP Calculation and Results Ana
    1000     0     000002     PREL     1     WIP Calculation on Basis of Actual Costs
    *1000     0     000002     TECO     4     Cancel Data of WIP Calculation and Results Ana
    We checked produciton order status TECO (CO03)
    but WIP is not equal to zero (KKAO)
    Also, we found production order status show "rel" status in KKAO.
    Why order status in CO03 is TECO, but show "REL" in KKAO?
    Thanks in advance.

    Hi,
    We also had similar issue that the WIP is not equal to zero even though the status of the Process Order is DLV/TECO. When we analyzed, we found that few of the operations/resources/activityeps are not yet confirmed in the same month for the order. These operations/resources/activityeps are confirmed in subsequent month, then WIP got automatically Zero.
    Also refer the SAP Note 530563 - WIP calculation: Status DLV and TECO. Which provide the details for how WIP will get calculated.
    Thanks & regards,
    ADI

  • Entries & Leaving Report displays data of selected not equal to org unit

    Hi,
    While using the standard report Entries & Leaving; in the selection criteria when I put
    NOT EQUAl TO(options) in front of the org unit and and mention the corresponding personnel area and entry date, the report still displays the employees with that particular org unit.
    Why is this happening? Any idea how to correct this?

    Hi Sikindar,
      I am using standard adhoc query report Entries& Leaving.( S_PH9_46000223 ). There on the selection screen I enter the following values:
    Personnel Area: GLLV
    Org Unit         : #(Not Equal To) 60000047
    Entry Date : 1.11.2008 to 28.11.2008> F8
    Now the report also displays the employees which belong to  o 60000047 which is incorrect.
    This is the exact problem and how to rectify this. Please suggest

  • MCHBH and MARDH tables are not equal

    Hi,
    We were trying to find periodic stock for batches, while we realise that MCHBH table total batch stock and MARDH total stock is not equal for an example of a material. Is that can be possible?
    Which table or bapi function is right for periodic batch stock ?
    Regards&Thanks,
    Begü

    S0001377806 wrote:
    >
    What movement types were used for this material and batch?
    -> many different movement types, GR/GI...
    this answer does not help, as it is movement type specific whether  SAP creates a batch number  or a posts to a storage location.  Without knowing the movement types that you used, I cannot really tell you why SAP updates the tables differently.
    you have to get deep knowledge on the movement types that are used in your company to make analysis like this one.
    Especially due to the fact that you are saying that it happens to many many materials, I do really think it is not an error in the SAP programs, it is more a misunderstanding on SAP processes, especially how the history tables are updated.
    Kunal gave you already the OSS note 193554. it explains the logic how SAP writes history records.
    SAP uses function modules to get the values from the previous period (which ones are explained in OSS note 415349)
    Thanks, this was actually the answer I was looking for
    I will look into movement type specific programming/customization.
    Edited by: Sebastian Stöckle on Nov 22, 2010 11:48 AM
    Edited by: Sebastian Stöckle on Nov 22, 2010 11:49 AM

  • Ending balance of 2008 not equal to beginning balance of 2009

    Hi All,
    Would like to seek help in knowing the reason why the ending balance of 2008 is not equal to the beginning balance of 2009. I have checked the reports generated by FS10N, FS10, and s_alr_87012284 but same result/problem is displayed.
    Thanks.
    Regards,
    Arlis

    Hi BSR,
    I tried to transfer balance using F.16 but it didn't resolved the issue. Same figures were reflected.
    Thanks.
    Regards,
    Arlis

  • GR  Qty value does not equal the value

    Hi,
    In PO,there have been 4 GRs where the Qty does not equal the Value.  How has this happened? 
    Could you please suggest me why the difference has come.
    Thanks in advance,
    Cheers,
    Veena

    Hi,
    Yes.you are right.My suggestion does not work here.
    Mr.Adam has given the perfect solution.
    But the problem is the limitations on availability to
    define Before aggregation as the aggregation property
    for CKF,even in Version older than 7.
    So try to implement the solution given by Mr.Adam with
    reference to version7 in your query even though your
    version is less than version 7.
    With rgds,
    Anil Kumar Sharma .P

  • BI analysis authorization- checking for not equal to values

    hello,
    the info provider (ZIC_COPA) is having auth. relevant char. are 0COMP_CODE, PLANT, 0SALESORG.
    When i am executing query which is built on ZIC_COPA info provider. It is checking all above charcteristics value. But in RSECADMIN i found that system is checking for not equal to values. For ex. please see below RSECADMIN trace. It is checking not equal to values for PLANT. does anybody know why it is checking NOT PLANT IN values??
    0COMP_CODE
    0PLANT
    0SALESORG
    SQL Format:
    COMP_CODE IN ('1000',,'3200')
    AND NOT PLANT IN ('1000','3200')
    AND SALES
    ORG IN ('1000',','3200',')
    AND TCAACTVT = '03' 
    Note: There is no hardocoding or exclusion values in the query.
    Regards
    Imran
    Edited by: Imran  Mulani on Jun 21, 2009 1:13 PM

    ok

  • Compressed String (GZIPOutputStream) is not equal to the source string

    Hello,
    I would like to compress the contents of a String (XML data) with the GZIPOutput/InputStream classes. Unfortunately I'm facing a problem - my source and result strings do not equal after the compression and decompression (I hope this is the correct sub-forum for this kind of question).
    Here is a example code that reads data from a file (test.xml), compresses it via a GZIPOutputStream into compressed byte array and decompresses it back into a String:
    public class CompressedStringTest {
         private static final String     FILENAME     = "test.xml";
         public CompressedStringTest() throws IOException {
              File file = new File( FILENAME );
              String xml = FileUtil.readFile( file );
              // COMPRESS
              ByteArrayOutputStream out = new ByteArrayOutputStream();
              GZIPOutputStream zipout = new GZIPOutputStream( out );
              zipout.write( xml.getBytes() );
              zipout.close();
              out.close();
              // DECOMPRESS
              byte[] result = new byte[ xml.getBytes().length ];
              ByteArrayInputStream in = new ByteArrayInputStream( out.toByteArray() );
              GZIPInputStream zipin = new GZIPInputStream( in );
              zipin.read( result );
              zipin.close();
              in.close();
              String xml2 = new String( result );
              System.out.println( "xml.equals( xml2 ): " + xml.equals( xml2 ) );
         public static void main( String[] args ) throws IOException {
              new CompressedStringTest();
    }The length of the source and result strings are the same, but they are not equal. When I print out the lines which do not equal, I get this:
    '</sysConfig>'
    '</sxxxxxxxxx'where "x" are those small boxes, characters that can't be printed.
    This is the source XML file I use:
    <?xml version="1.0" encoding="UTF-8"?>
    <sysConfig xid="0" version="0.1" id="1" xmlns:r2="http://....">
        <addresses class="java.util.ArrayList" xid="1">
            <address xid="2" id="1">
                <config xref="0"/>
                <addressType xid="3">NURSING_SERVICE</addressType>
                <externalId xid="4">0</externalId>
                <name xid="5">This is the name containing fourtyeight chars!!!</name>
                <street xid="6">street</street>
                <city xid="7">city</city>
                <zip xid="8">zip</zip>
                <telephone xid="9">12345</telephone>
                <fax xid="10">(123) 12345612345454597745</fax>
            </address>
         </addresses>
        <lastModified class="java.util.GregorianCalendar" xid="8167">2009-09-17 10:38:59.0 MESZ</lastModified>
        <customerNr xid="8168">FB-IK-01001</customerNr>
        <customerName xid="8169">A Customer</customerName>
        <logProtocolChanges>false</logProtocolChanges>
        <useHomeAsStartAddress>false</useHomeAsStartAddress>
        <sendMailEnabled>false</sendMailEnabled>
        <sendFaxEnabled>true</sendFaxEnabled>
    </sysConfig>When I remove just one arbitrary line, the source and result strings do equal. This may have to do with some kind of buffer-length-problem, but I just can't figure out where the problem is.
    I really appreciate your help
    Thanks a lot!

    The javadoc reads for "FilterInputStream.read(byte[] b)":I've read it. You're the one who needs to read it.
    Reads up to* byte.length bytes of data from this input stream into an array of bytesSo I thought it just reads all available data.Why? That's not what it says, is it?
    But when I print the return code of "read", it is not -1, meaning not the whole data has been read.If that is supposed to be 'meaning that the whole data has been read', you are mistaken. What was the return value? compared to the buffer length? You might find it interesting ...
    I assume I just do not understand the read method completely.The return value is -1 for EOS, otherwise the number of bytes that were read. Just like it says in the Javadoc actually.
    You have to use a loop, increment the offset, etc.

  • Why does Firefox not work here in China anymore, since January of 2015?

    I have used Firefox for years, as the fastest and most reliable browser for me, esp in China... not anymore! Last month (unknown to me) a hijacker called Vosteran took over my Firefox browser. I finally realized it and got it cleaned up using Malwarebytes anti-malware, and downloaded a new Firefox... now SAME problem exists, even with Vosteran removed!
    Firefox will not allow me into ANY normal sites, saying they don't have the proper security code. This includes my Yahoo front page, email account, ESPN and other common sites that are certainly NOT dangerous. So, WHY does Firefox not work anymore? It is useless to me here in China the way it works now.

    hello rickinchina, first please make sure that the '''date, time & timezone''' are set correctly on your system and that firefox is set to directly connect to the internet (that's the "'''no proxy'''" setting in the firefox ''menu ≡ > options > advanced > network > connection - settings...'').
    if this doesn't solve the issue (or it is already set properly), a possible solution depends on different factors:
    * what is the '''error code''' shown under ''technical details'' on the error page?
    in case the error code equals ''sec_error_unknown_issuer'', please attempt to add an exception on the bottom of the error page (but don't do it for real) and inspect the certificate (see the screenshot attached for instructions):
    * which '''issuer information''' does the certificate contain?
    please report back with those two pieces of information. thank you!

  • Why I can not find the percentage calculation %ct

    Hi,
    I m trying to use the Percentage Calculation %ct for a calculated KeyFigure. There are only two Functions: %  and  %A
    Can anyone explain why it is so?
    thanks and regards

    Hi,
    Percentage Variance (%)
    <Operand1> % <Operand2>
    This gives the percentage variance between operand 1 and operand 2. 
    Percentage Share (%A)
    <Operand1> %A <Operand2>
    This gives the percentage share of operand 1 and operand 2. It is identical to formula 100 * <Operand1> / abs(<Operand2>) , if <Operand2> is not equal to 0 and the character for u201CDivision by 0u201D if <Operand2> is equal to 0.
    Use
    You use the following percentage functions as operators when you define a formula or a calculated key figure.
    Features
    NULL values are displayed as empty cells, not as 0. For more information about when NULL values occur and how they are displayed, see Technical Notes About the Formula Operators.
    Percentage Variance (%)
    <Operand1> % <Operand2>
    This gives the percentage variance between operand 1 and operand 2. It is identical to:
    Formula 100 * (<Operand1> - <Operand2>) / abs(<Operand2>) , if <Operand2> is not equal to 0 and the character for u201CDivision by 0u201D if <Operand2> is equal to 0.
    Plan Sales % Actual Sales specifies the percentage difference between the plan sales and the actual sales.
    Percentage Share (%A)
    <Operand1> %A <Operand2>
    This gives the percentage share of operand 1 and operand 2. It is identical to formula 100 * <Operand1> / abs(<Operand2>) , if <Operand2> is not equal to 0 and the character for u201CDivision by 0u201D if <Operand2> is equal to 0.
    Character for "Division by 0" :See SAP Reference IMG  u2192 SAP Customizing Implementation Guide  u2192 SAP NetWeaver  u2192 Business Intelligence  u2192 Settings for Reporting and Analysis  u2192 General Settings for Reporting and Analysis  u2192 Display of Numeric Values in the Business Explorer.
    "Fixed costs" %A "costs" expresses the proportion of the total cost of a product that is the fixed cost.
    Percentage Share of Result (%CT)
    %CT <Operand>
    This shows how high the percentage share is, with regard to the result. The result is the outcome of aggregating the second highest results level (interim result).
    Use
    You use the following percentage functions as operators when you define a formula or a calculated key figure.
    Features
    NULL values are displayed as empty cells, not as 0. For more information about when NULL values occur and how they are displayed, see Technical Notes About the Formula Operators.
    Percentage Variance (%)
    <Operand1> % <Operand2>
    This gives the percentage variance between operand 1 and operand 2. It is identical to:
    Formula 100 * (<Operand1> - <Operand2>) / abs(<Operand2>) , if <Operand2> is not equal to 0 and the character for u201CDivision by 0u201D if <Operand2> is equal to 0.
    Plan Sales % Actual Sales specifies the percentage difference between the plan sales and the actual sales.
    Percentage Share (%A)
    <Operand1> %A <Operand2>
    This gives the percentage share of operand 1 and operand 2. It is identical to formula 100 * <Operand1> / abs(<Operand2>) , if <Operand2> is not equal to 0 and the character for u201CDivision by 0u201D if <Operand2> is equal to 0.
    Character for "Division by 0" :See SAP Reference IMG  u2192 SAP Customizing Implementation Guide  u2192 SAP NetWeaver  u2192 Business Intelligence  u2192 Settings for Reporting and Analysis  u2192 General Settings for Reporting and Analysis  u2192 Display of Numeric Values in the Business Explorer.
    "Fixed costs" %A "costs" expresses the proportion of the total cost of a product that is the fixed cost.
    Percentage Share of Result (%CT)
    %CT <Operand>
    This shows how high the percentage share is, with regard to the result. The result is the outcome of aggregating the second highest results level (interim result).
    If a characteristic has been drilled down in both the rows and the columns, this reference is not unique. The system displays a warning and the relevant symbol for Data Does Not Exist. For more information, see SAP Reference IMG  u2192 SAP Customizing Implementation Guide  u2192 SAP NetWeaver  u2192 Business Intelligence  u2192 Settings for Reporting and Analysis  u2192 General Settings for Reporting and Analysis  u2192 Display of Numeric Values in the Business Explorer.
    Percentage Share of Overall Result (%GT)
    %GT <Operand>
    This shows how high the percentage share is with regard to the overall result. The overall result is the outcome of aggregating the highest results level. Dynamic filters (filters that were not specified in the Query Designer) also play a role in calculating the overall result.
    Percentage Share of Query Result (%RT)
    %RT <Operand>
    This is the same as %GT.
    Unlike the process for calculating the overall result, dynamic filters are not used in the calculation of the query result. This means that the calculation always normalizes to the same value, irrespective of the filter status and the navigational state.
    Reg
    Pra

  • 5.1-5 is not equal to .1 ?

    Hi all...
    I'm using LabVIEW 8.5, When i tried to compare the result of difference of 5.1 and 5 (i.e 5.1-5) with .1 , the result was not equal. I used DBL representation.
    Why is this so...?

    Your computer is binary, your number system is decimal. There will be rounding problems, using floating numbers for equality will get you into trouble. You should do an in range check of 0.1 +- 0.1 % or so. See wikipedia for more info.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

Maybe you are looking for