Traditional Culture Encyclopedia - Photography and portraiture - How to merge java string arrays into one array?
How to merge java string arrays into one array?
Parcel? com . Qiu . Lin . he;
Import? Java . text . parse exception;
Import? Java . util . array;
Public? Class? Shi Ce? {
Public? Static electricity Invalid? main(String[]? args)? Throwing? ParseException? {
String[]? str 1? =? {? “J”,? One. “v”,? One. "Medium"? };
String[]? str2? =? {? "Like"? "what"? "ba" "two" a。 "Numbers"? "Group" and "Together"? "and"? "for",
"one" and "one" };
int? strLen 1? =? str 1 . length; //? Save the length of the first array.
int? strLen2? =? str2.length//? Save the length of the second array.
str 1? =? Arrays.copyOf(str 1,strLen 1? +? strlen 2); //? Expand telecom capacity
System.arraycopy(str2,0,? str 1,? strLen 1,? strlen 2); //? Merge the second array with the first array.
system . out . println(arrays . tostring(str 1)); //? Output array
}
} The running results are as follows:
- Previous article:What does Sony G lens mean?
- Next article:Clouds and terraces are picturesque.
- Related articles
- Will using someone else's avatar infringe copyright?
- A must-read dating guide for 520 couples in Dongguan
- What popular tourist routes in Suzhou are worth recommending?
- Basic characteristics of news photography
- What kind of car does God Dog drive in Xiaoqi?
- Excuse me, is it better to use PVC background board or background paper to shoot still life? I don't shoot products, I want to learn.
- TVB TV series "women are hard to do"
- What does Sony G lens mean?
- Where can I buy Nikon d40 sets in Changsha now? Please, great gods.
- How to walk more appropriately in a wedding dress