North Drift Interview Experience (one (two) years work experience)--Java Foundation section

Source: Internet
Author: User

Java Basics Section

    1. The difference between constants and variablesis that the final keyword modifier is constant, and if there are static keyword modifiers, it is often called a compile-time constant. Variable, the runtime can modify its reference.
    2. Java is basically similar to what
    3. 1 Byte = 8 bits (in detail, this is actually related to the number of bits in the machine.) )

    4. String/stringbuffer/stringbuilder differences: String constants, string lengths immutable, StringBuffer (JDK 1.0) security (does not mean that threads are safe) can be repeated operation of string variables Stringbulider (JDK 1.5) is unsafe and can be reused as a string variable because it is unsafe, so it is more efficient than StringBuilder.
    5. Collection (holding object, container): HashMap allows NULL to be used as a entry key/value, and Hashtable not allowed. Hashtable, Vector, Stack belongs to obsolete classes are not recommended for use

    6. Static and fianl and finally:

      The blank final can be defined, but it must be initialized inside the constructor or at the definition.
      Static is initialized at load time, and non-static is initialized after loading.

    7. Continue updating ...

North Drift Interview Experience (one (two) years work experience)--Java Foundation section

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.