Package Three;//declaration Pack
Import Java.util.scanner;//importing the System Package
Import one.two.school;//importing a user package
Import one.two.animal;//recommended: do not waste memory
Import one.two.*;//* for all classes under One.two package (not recommended: wasted)
Normal String: The string has an automatic optimization capability definition when there is a direct reference to the memory found
Object string can only be used with equals = =
Equalsignorecase () Ignoring case comparisons
Concat can only be spliced with strings
+ string and any type can be spliced
IndexOf
IndexOf from left to right 1th returns the index of the original string
LastIndexOf from right to left 1th returns the index of the original string
int A=email.indexof ("2", 6);//sub-string in the original string where the index-1: there is no >=0 exists
Substring: Intercepting strings
String email= "[email protected]";
String b=email.substring (9,11);//intercept from 9 index to 11 index before one (end index does not intercept)
Split splits a String--array
Using Java to understand program logic (15)