String StringBuffer Arrays Strings modified stitching

Source: Internet
Author: User

 PackageBaozhuang;Importjava.util.Arrays;ImportJava.util.Scanner; Public classexe { Public Static voidMain (string[] args) {String s= "27o51i51022i8"; S= S.replace (' O ', ' 0 '); S= S.replace (' I ', ' 1 ');                System.out.println (s); String S0= "My_english_name"; String[] S1= S0.split ("_"); s1[0] = s1[0].tolowercase (); s1[1] = s1[1].touppercase (); s1[2] = s1[2].touppercase (); //String concatenationString S2 =s1[0]+ s1[1]+s1[2]; String S3= S1[0].concat (S1[1]). Concat (s1[2]);        System.out.println (S3);        SYSTEM.OUT.PRINTLN (S2);        System.out.println (arrays.tostring (S1)); //StringBuffer StitchingStringBuffer S4 =NewStringBuffer (s1[0]); S4= S4.append (S1[1]). Append (s1[2]);                System.out.println (S4); Scanner input=NewScanner (system.in);        String Word; StringBuffer S5=NewStringBuffer ();  Do{System.out.println ("Please enter the English word:"); Word=Input.nextline (); if(Word.equals ("End")){                 Break; } S5= S5.append (word+ ","); } while(true);        System.out.println (S5); String S6=s5.tostring (); String [] S7= S6.split (","); /*for (int i = 0; i < s7.length; i++) {System.out.println (s7[i]); }*/        //For each loop         for(String s8:s7) {System.out.println (S8);    } input.close (); }}

String StringBuffer Arrays Strings modified stitching

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.