Why is the Integer wrapper class object and primitive object equal ?

This is my code :
package obectorientation;
public class oo3 {
     public static void main(String[] args) {
          int x=1; float y=1.0F;
          int x1=1;
                                Integer y1= new Integer(1);
          if(x1==y1)
               System.out.println("Equal");
          else
               System.out.println("NOT Equal");
O/P : EqualMy question is why are x1 and y1 equal ? Won't y1 be a different object and x1 just a primitive variable ?
Thanks in Advance.

Specifically, it's because y1 gets unboxed before the comparison. What's really happening is effectively: if ( x1 == y1.intValue() )

Similar Messages

  • Why is the "Sign Document" grayed out and unusable on my Mac?

    Why is the "Sign Document" grayed out and unusable on my Mac?  Please help.

    Check this it maybe the problem
    Settings > Messages > MMS Messaging > is it on?
    Hope that helps

  • What are the differences between PD objects and PA objects?

    can any one tell me What are the differences between PD objects and PA objects?

    PA is based on Infotypes 0000-0999. PD is based on Infotypes 1000-1999, chief being Objects Infotype 1000. Objects Infotype is the source of different Object Types such as Person, Position, Org Unit etc. You can check that through transaction OOOT.
    Regards
    Lincoln

  • Mac os x 10.6.8 why do the fans keep coming on and computer slows down

    mac os x 10.6.8 - Why do the fans keep coming on and computer slows down with coloured circle.

    Use your Activity Monitor, sort the %CPU column to identify what process is hogging your resources.

  • What is the best combination of read and write objects to binary files ...

    Hi everyone,
    what are the best combination of read and write objects to read/write a record of customers from a binary file. I should be able to use StringTokenizer. I am bit confused with all these Stream reader and writers.
    abdul

    You are, indeed, confused:
    o StreamTokenizer works on character input, not binary input.
    o Readers and Writers in general work on character streams, not binary.
    That leaves you various input streams and output streams for reading binary data.

  • Why does the store app keeps loading and doesn't work ?

    why does the store app keeps loading and doesn't work ?

    Hi Peter,
    In order to analyze your issue better, we need more detailed information.
    Did you mean when you launch the Windows store app, the app can't start? Was there any prompt message or error code? Did this issue occur on all Windows Store app or specific one?
    Try the method in this blog:
    Fix Store App in Windows 8.1
    http://blogs.msdn.com/b/notime/archive/2013/10/18/fix-store-app-in-windows-8-1.aspx
    Karen Hu
    TechNet Community Support

  • Why does the "fix" for firefox copying and pasting not work?

    I did the fix a few times and restarted firefox, with no success. Also, I installed the latest version of firefox and it is slower now. I have to use firefox for school, otherwise I would just find another way.

    In what way is Firefox slow?
    Is this all the time or only with loading web pages?
    What kind of fix do you mean with: ''Why does the "fix" for firefox copying and pasting not work'' ?

  • What is the differene between class diagram and er diagram .....pls ex

    what is the differene between class diagram and er diagram .....pls explain with examples

    <b>Diff btw Class Diagrams and ERD's:</b>
    Class diagrams and ERDs both model the structure of a system. Class diagrams
    represent the dynamic aspects of a system: both the structural and behavioural features.
    ERDs, depicting only structural features provide a static view of the system.
    Elements of a class diagram:
    >class
    >association
    >binary
    >n-ary
    >Aggregation
    >Composition
    >Generalization
    >Dependency
    >Realization
    >Association Classes
    Elements of Entity Relationship Diagrams:
    >Entity - A data attribute is a property common to an entity.
    Check this link
    www.cdf.toronto.edu/~csc340h/summer/tutorials/TutorialClassERD.pdf
    Regards,
    Pavan.

  • Data objects and code objects in oracle application

    Hi,
    can any one please help me out with following question?
    1. what are data objects and code objects in oracle apps and why is that difference?
    2. How does the objects gets created in Oracle Applications, like during the installation which part is responsible for creating objects and after the installtion later point of time, how the new objects gets created in oracle applications?
    3. what are the ways to find out if my 11i application is OATM enabled ?
    Thanks in advance

    Hello,
    I managed to find answer for question 1, yet to find answer for 2 and 3.
    Answer for question 1 --
    Data objects : store and access business data (tables, indexes, sequences, index-organized tables, etc);
    Code objects : process data objects but them don't contains business data (functions, procedures, packages, views, synonyms);
    Now, here i have a question - under which objects queues are considered ?

  • Business Objects And ABAP Objects ?

    hi all!
    May be this is a repitition but still :
    Can anyone give me a clarification on Business objects and abap objects in termas of difference-relations b/w them.
    regards
    sachin

    Hi Sachin,
    Please refer the below links,
    Business Object Repository and Class Library
    business objects
    Hope this helps.
    Regards,
    Hema.
    Reward points if it is useful.

  • What is different between conflict object and lingering object in AD

    Hi
    I found lots of conflict object in my Forest on AD 2k8R2 with FFL & DFL 2k3 with dsquery filter "(name=*\0ACNF:*).
    But Only I can see 4 to 5 AD object in ADUC.
    How can I found others.
    Also these conflict object are replicated with AD replication? and due to these conflict object, can be any issue in AD replication like slow replication or delay replication?
    If I delete them then how can I delete and which command or tool like LDP?
    Also Is conflict AD Object and lingering objects means are same?
    Please suggest and guide..
    See below link of my conflict object ..
    http://sdrv.ms/19DUTbi

    IT means... If I don't find duplicate or conflict object in ADUC then I no need to worry about it as after AD tombstone lifetime period, these conflict object would be delete automatically ...?
    Conflict objects can be duplicate or lingering objects both & you need to worry. Consider an example, if you have a system named abc & you try to join another system with the same name from other site DC where connection b/w other DC's are down &
    ABC information is not present in that local DC, it will allow you to join system in the domain with the same name, then the object joined later vl have CNF added.
    Another case, two new systems are joined together from two different AD site with the same name, it will allow you to join & once replication occurs, you will find duplicate name with CNF.
    Same problem happens, when you connect old DC which has crossed TSL. WHat happens here is you have most recent DC with the deleted objects, when you connect old DC which has not received replication & crossed TSL, again during replication, you will see
    objects with CNF which will be lingering objects.
    So, CNF objects can be duplicate & lingering objects both & in both the case, i'll worry. Lingering objects are not visible directly, you can find out using repadmin tool. It is really complex to clean them if they exists in the ready only partition
    of the GC.
    http://technet.microsoft.com/en-us/library/cc738018%28v=ws.10%29.aspx
    Awinish Vishwakarma - MVP
    My Blog: awinish.wordpress.com
    Disclaimer This posting is provided AS-IS with no warranties/guarantees and confers no rights.

  • Main Objects and sub-objects

    Hi All,
    Please tell me what is the meaning of 'Main Objects' and 'Sub-objects' in CRM.
    Thanks.

    Dear Nishikant,
    Kindly follow the below blog which is exporting your crystal report to HTML4.0 version.
    If it successfully imported, then  the problem may reside in the mapping of values to the SWF file.
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417200)ID0191682050DB01264035234114071801End?blog=/pub/wlg/15995
    Hope this will help you.
    Regards
    Gokul.N

  • Time series objects and order objects on what condtion we need to use

    Dear Experts ,
    I have question regarding Time series objects and order objects
    from my understanding
    TIme series objects the data is stored in time buckets without
    reference to orders.
    Order objects the data is stored as orders. Key figure data is
    then saved as orders if semantic 000 is entered in the detail view of the key
    figures in the planning area.
    my question is when to use the option 1 and when should not use
    same for option 2
    Many thanks
    Regards
    Raj

    Hi,
    This depends on the requirement you have also the application you are using.Like DP key figures are generally time series since in DP you do not need order numbers for example for history sales the requirement is the quantity period wise but not the order numbers.
    Again in SNP the distribution and planned quantities are required order wisecoz you need the order numbers you execute the same in ECC system or for Pegging purposes.
    Now the safety stock requirement can not be at order series since this is with relevent to some periods.
    So overall i can say this depends on the requirement of the kay figure.
    Hope this can help.
    regards,
    kaushik

  • The difference between class, instances and object?

    I've been reading a JAVA book and i've come accross terms such as class, instances and object. What I don't understand is why after creating a class, we have to create an object and then create instances? What's an object and instance anyway? I don't really understand the term. Can anyone pls help and explain it to me in an easier way to understand?
    Thanks a lot.

    A Class defines what attributes (properties) and methods a particular item will have.
    Ex. You have a class person
    public class Person
    public void walk()
    String name;
    int age;
    }An instance and Object are the same. When you create an instance of a class, you get an object of that class.
    Person kevonline = new Person();You can then set kev's name, age, make him walk, etc... since these are defined in the class Person.
    HTH,
    Dewang

  • How do I regenerate the JDBC wrapper class?

    I am seeing the following in Weblogic 10.3.
    java.lang.IllegalAccessError: tried to access class oracle/bi/jdbc/AnaJdbcResultSetImpl from class weblogic/jdbc/wrapper/ResultSet_oracle_bi_jdbc_AnaJdbcResultSet
    As I understand it, the wrapper class is auto-generated. How do I re-grenerate the wrapper class to get it in sync?

    It should never not be in sync. It is generated dynamically according to the BI classes currently
    available, which doesn't change while the JVM is running. Open a BI JDBC SR.
    Joe

Maybe you are looking for

  • Request for info. on USER EXIT/BADI for FB60

    Hi, This is with reference to FB60 user exit/badi for with holding tax.I want to use the customized table for withholding tax. ]Please guide some alternative solution rather than user exit and badi. I dont think the following user exit and badi are u

  • Mac crashes adobe acrobat 9.0 constantly

    Hello! I constantly have the adobe acrobat 9.0 crashing on my IMac at work. We have purchased CS5 and I have spoken with an Adobe rep who insists that the issue is Mac related and has nothing to do with them. Before I can even get ready to print or v

  • How to config the user and role in the runtime for executing in the GP?....

    Hi Experts, I am learning GP(Guided processor)according the document http://help.sap.com/saphelp_nw70/helpdata/en/44/0d5b8f250d5cfae10000000a155369/frameset.htmneed. I meet two question when I learn the GP. The first: This document don't tell me how

  • Use 2nd Mac as Airtunes Speaker

    Hi. Anyone know whether/how I can use a second Mac (mini) as an Airtunes speaker, rather than buying another airport express and speaker setup? Tks

  • Developer 6.0/Personal Oracle WIN '98

    After a fresh install of both Personal Oracle and Developer 6.0 when I attempt to start the Database I get the following error: "The Oracle80.EXE file is linked to missing export NS80.dll:nszclientroles". Upon installation of the DB, prior to install