Summary of learning contents of textbook
Regular expression: a regular expression is a sequence of characters of a string object that contains characters that have special meanings, which are called meta-characters of regular expressions.
Catalogue
Directory
Final meaning
Final variable
Final method
Final class
Final keyword Benefits
Final meaningFinal is a reserved keyword in Java that can declare member variables, methods, and classes. Once you
Objective:class file structure, classes loading mechanism, class loader, runtime data area These four Java technology systems are very important knowledge, after learning these, we know that a class is loaded through the class loader to the virtual
Brief introductionSummarize how final and static are used in JavaI. FinalDepending on the context of the program, the Java keyword final has the meaning of "cannot be changed" or "End state", which can be used to modify non-abstract classes,
polymorphicEncapsulation creates a new data type by merging features and behaviors.The function of polymorphism is to eliminate the coupling relationship between types.method Call BindingDefinition: Associating a method invocation with the same
the final keyword123, the final member variable represents a constant, can only be assigned once, and the value will no longer change after the value is assigned. (for const inC + +) 4, final cannot be used to decorate a construction method. "Why
Vamei Source: Http://www.cnblogs.com/vamei Welcome reprint, Please also keep this statement. Thank you!We have always defined classes (class) for the purpose of producing objects. An object is a functional entity, and a class is a type
Polymorphism separates the interface from the implementation by separating "what" and "How to do" from another perspective. The role of polymorphism is to eliminate the coupling between types, and polymorphic method invocations allow a type to
Heavy duty overloadFor: Methods already in the classOverloading conditions:
The same method name, different parameter list "Different parameter list includes the type of parameter, the order of parameters"
Does not constitute an
Objective:Encapsulation: Creates a new data type by merging features and behaviors.Implementation concealment: Separating the interface and implementation by "privatizing" the details.Polymorphism: Eliminates the coupling between types. Also known
Access modifiers:Default, public, private, protectedNon-access modifiersStaticStatic methods, static variablesFinalFinal variable: The final variable can be displayed initialized and can be initialized only once. A reference to an object that is
keywords in Java finalLook at the final in the big Java, feel very interesting, so combined with the contents of the book and their own ideas to write down this article as a record and their understanding, if there is wrong hope to give corrections,
In Java, the final keyword is used to declare an object to have invariance (immutable), where objects include variables, methods, and classes, similar to the const keyword effect in C + +.Immutable means that the state cannot be changed after the
Programming | Repeating Java has a lot of praise of the function, the application of code is one of them. But if you want revolutionary change, you have to go far beyond the old code of "Replicator code, then change": combination (composition) and
This article see: http://www.cnblogs.com/dolphin0520/category/361055.html1. Byte stream and character stream1). When a character stream operation uses a buffer, the contents of the buffer are forced to be output when the character stream is closed,
This problem is more difficult to do, at first I think is a stack of solution, feel too cumbersome (out of the stack, into the stack, calculate volume), but it is not a good attempt, this method is still a little problem, after will think clearly.
The final keyword in Java is used to restrict the behavior of the user, in other words, to restrict our programmers. Final can be used to modify: variables, methods, classes.1) Java final variableWhen final is used to modify a variable, the value of
Examples are as follows:Private Context Motherappscontext=null;private static final String mcube_package= "COM.MCUBE.ACC";private static final String mcube_class= "Com.mcube.acc.SensorControl";Private Class Mcubeclass=null;Private Integer
Variables defined by final can be regarded as constants and cannot be changed;Methods defined by final cannot be overwritten;Classes defined by final cannot be inherited.Final Static is added with the static feature.
Static and final are not
1 Final data:1> final modification before the basic type indicates that the modified variable is a constant and cannot be modified. A static or final field indicates that only a bucket cannot be changed.2> when final is used for object applications,
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.