Dark Horse programmer-28th days of Java Basics

Source: Internet
Author: User

 

-----------AndroidTraining,JavaTraining,JavaWe are looking forward to sharing our learning technology blog with you!------------


 

1: Regular Expression (understanding)

(1) A regular expression is a string that meets certain rules.
(2) Rules to be mastered
1: character
X characters x
\ Backslash character
\ N linefeed

2: character class
[ABC] A, B, or C
[^ ABC] any character except A, B, or C
[A-Za-Z] letters from A to Z or from A to Z are included
[0-9] 0-9 numeric characters

3: pre-defined character class
. Any character
\ D Number: [0-9]
\ D non-numeric: [^ 0-9]
\ W word character: [a-zA-Z_0-9]
Characters: English letters, numbers, and underscores
\ W non-word characters: [^ \ W]

4: Border Matters
^ Beginning of a row
$ End of a row
\ B word boundary

5: greedy quantifiers
X? X, neither once nor once
X * X, zero or multiple times
X + X, once or multiple times
X {n} X, EXACTLY n times
X {n,} X, at least N times
X {n, m} X, at least N times, but not more than m times

6: group concept
If this is an expression (a) (B (c), it should be divided into the following groups according to the group concept:
Group 1: (a) (B (c ))
Group 2:
Group 3: B (c)
Group 4: c
(3) Use of Regular Expressions
A: Judgment Function
String split ()
C: replacement function
String -- replaceall ()
D. Obtain the function.
Pattern
Compile
Matcher
Find
Group
(4) case studies
Email Verification
I want to learn Programming
IP address sorting

2: Reflection (understanding)
(1) Reflection uses all its members through the Class Object of the runtime class.
(2) three methods for obtaining Class Object
A: getclass () method of Object Class
B: A static property. Class
C: static method forname of class
(3) Use of reflection
A: Constructor
B: member variables
C: Member Method
(4) case studies
A: Use the configuration file to run the methods in the class.

B: Reflection checks during compilation

 

-----------AndroidTraining,JavaTraining,JavaWe are looking forward to sharing our learning technology blog with you!------------

 

 

 

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.