Java Basics (i)

Source: Internet
Author: User

  • Basic features: encapsulation, inheritance, polymorphism
  • Some new features:
      1. Static Import: Import static package name
      2. Functions with variable parameters: Add (int ... x)
      3. Enhanced for loop: for (int x:xs)
      4. Automatic unpacking: Basic type, Class object (uniqueness), Int–>integer
  • Enum Type:
      1. Generic enum type: Public enum name {,,,,}
      2. Advanced enumeration types: Each enumeration type can be followed by a corresponding method
  • Reflection:
      • There are three ways to get class:
        1. By object: GetClass ()
        2. By class: Class name. class
        3. By class Keyword: Class.forName (package name)
      • Reflection Type:
        1. Construction Method Reflection
        2. Member Field Reflection
        3. Member method Reflection: Static Master Method and general method
        4. Array Reflection
      • Main methods
        1. Isprimitive ()//is a basic type
        2. IsArray ()//is an array type
        3. Invoke (object, parameter)//general and the following methods used in conjunction with the main method of reflection method
        4. GetMethod (method name, parameter type)//method reflected by the Member method
  • Callout: @ Callout keyword
  • Generics: (This thought is important)
  • Class loader: Class name. Class.getclassloader ()
  • Dynamic Agent
  • MyEclipse configuration is based on the workspace, if you want to configure the cracked 64-bit myeclipse,jdk to install the 32-bit
Technorati mark: Personality determines fate focus change life

Java Basics (i)

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.