Data Architecture and JAVA Collection framework

Source: Internet
Author: User

I. Important features of java
1: Data abstraction principle: the user code cannot access the implementation details of the classes in use. If Class A uses Class B, the method A cannot access the fields of Class B, b's field can only be accessed using B's method.
2: open/close principle: each class should be developed (extended by inheritance) and closed (stable for existing applications)
3: All other public classes can be seen.
Protected is only applicable to this class, subclass, and other classes in the package. When it is not written by default, it is of the protected type.
Private can only be used by this class. Subclass can only be inherited and cannot be used (only visible and unavailable)
4: abstract class: class with at least one abstract Method
Abstract Fang fa uses abstract As the qualifier. abstract methods do not have specific method definitions, so they cannot be instantiated.
An interface is a set of abstract methods and constants. There are no definite methods and no fields in the interface. All methods in the interface are abstract methods and are public.
If a class only implements some methods of the interface, the class must be declared as an abstract class.
5: some important conversion formulas
Int I;
Integer myInt;
String s;
I = myInt. intValue ();
I = Integer. parseInt (s );
MyInt = new Integer (s );
MyInt = new Integer (I );
S = Integer. toString (I );
S = myInt. toString ();
6: There are two types of variables in java: the original variables and the reference variables. The original variables Save the values of the original data (byte, short, int, long, float, double, char, boolean ),
Reference variables save references to objects.

 

This article is from cainiao Park"

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.