Java Job's hands-on brain

Source: Internet
Author: User

1 . Enum type is a reference type, but the output of an example does not refer to the same type. Enumeration types can have their own properties (parameters) and methods, and enumeration types can exist as separate files.

2, the first "x+y=" +x+y run result is the default is to add a character and a character, the second x+y+ "=x+y" Run result is the default first plus the number plus characters.

3, the value of the binary representation:

The original code: is the binary fixed-point notation, that is, the highest bit is the sign bit, "0" is positive, "1" is negative, the remaining bits represent the size of the value.

Inverse code:: The inverse code of positive number is the same as its original code; the inverse code of negative number is the inverse of its original code, except the sign bit.

Complement: The complement of a positive number is the same as its original code; the complement of a negative number is the minus 1 of its inverse code.

For Java, positive numbers are used for the original code. Inverse code for negative numbers.

4, the scope of the variable.

is the range of code that you can use to define variables.
Global variables: Variables that are defined in a class (not in a method) are available in this class.
Local variables: Variables defined in a method that, once out of this method, cannot be used.

Other:
There are also static variables that can be used directly with the class name.
Ordinary class variables are called with the class object.
The final variable cannot be changed after the assignment.

Java Job's hands-on brain

Related Article

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.