This split method of the Strig class has been used many times. I have referred to a lot of online materials and summarized it now.1: usage of the second parameter of the split FunctionI saw a problem on the Forum, and then I became interested in
There is a String.Split () method in the Java.lang package, and the return is an array.1,"." and "|" is an escape character and must be added "\ \";If you use "." As a separate word, it must be written as follows:String.Split ("\ \"), in order to
1) Initialization of a string objectBecause string objects are particularly common, Java provides a simplified, special syntax for initializing a string object in the following format:String s = "abc";s = "Java language";In fact, according to the
In Java, we can use the Split method (Java.lang.string.split) to split a string into a specified delimiter, and then return an array of strings, followed by an example of string.split usage and considerations.Split methodSplits a string into
Java entry (5) -- String/string class, entry String
In the previous example, there was a String example. Some friends certainly didn't know what to do. In fact, the String class is a special class in Java, namely the String class. It is not one of
JAVA basics -- Re-recognize String strings, and java re-recognize stringIn-depth analysis of Java String
Strings are everywhere in program development. For example, the user name and password entered during user login use strings.
In Java, strings
Split () split string1. Distinctions in different environmentsJava: The split string cannot be written as split ("$")//$ as the character to be splitAndroid: Split string needs to be combined with brackets split ("[$]")//$ for the character to be
Source http://java2000-net.iteye.com/blog/242162
First look at the source code Java code/** * * @author Zhaoqing www.java2000.net * * * * clas s T {public static void main (string args[]) {string num[] = new STRING[11]; String sline
1-Hierarchical inheritance2-Variable and immutable concepts3-string3.1-string is a very special class3.2-string literals vs. String objectsMethods of 3.3-string3.3.1-length ()3.3.2-concat (String)3.3.3-indexof (..)3.3.4-substring (..)3.3.5-replace3.3
Java split method
1. interval no. "."
(1) str. split (".")
String str = "10.156.35.87"; String [] str1 = str. split ("."); for (int I = 0; I
The running result is blank, that is, no result is output.
(2) str. split ("\\.")
String
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.