Java Learning Note Two

Source: Internet
Author: User
  1. Java variables: class variables (static adornments), member variables, local variables, Java no global variables
  2. Create object: A. Declaring variables, B. instantiating objects, c. Initializing variables
  3. Java access modifier: public: All visible, Protected: Class of the same package and its subclasses (not visible in the same package) visible; private: same class visible; default is uniform package visible
  4. The access modifier for the class has public, the default package is visible, the modifier is final, abstract;
  5. The access modifier for the method has public, private, protected, modifier has static, final
  6. The access modifier for a variable has public, private, protected, modifier has final, static, abstract, synchronized
  7. Ordinary classes are not static modified, static can only decorate the inner class
  8. Method overloading: Multiple methods in the same class have the same name, the parameter list is different, the parameter list contains the number of parameters, order, type at least one of the different, is declared final, static method cannot be overloaded;

Java Learning Note Two

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.