= = and! =

Source: Internet
Author: User

1 FinalInteger NUM1 =NewInteger (77);2         FinalInteger num2 = 77;3 4         FinalInteger num3 =NewInteger (77);5         FinalInteger Num4 = 77;6 7System.out.println (NUM1 = =num2);8System.out.println (NUM1 = =num3);9System.out.println (num2 = = NUM4);
View Code

The operator relationship operator in Java has been only understood, not explored in depth. Recently, we are studying the idea of Java programming and will do a little reading later. Here is the article for the first chapter of Xiao Kee.

Usually a lot of time will be used to compare objects, the object of comparison has three forms: = =,! = and. Equals () methods. where = = and! = belongs to a class of operators,. Equails (), is the method that integrates object.

= =,! = comparison is a reference to an object, as illustrated below:

= = and! =

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.