herrDeng網內搜尋

自訂搜尋

Ads

2015年12月4日 星期五

ex10 字串練習

String X="this is an exercise. A happy Day"
1.去掉空格
2. a->@, e->'您'
3 改大寫
4 取子字串4~8
5. 字串反轉

30 則留言:

A10433013 提到...

public class ex2 { public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); System.out.println(x.replace(" ","")); x=x.replace(" ",""); System.out.println(x.replace("a","@")); x=x.replace("a","@"); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4,9)); x=x.substring(4,9); char xx[]=x.toCharArray(); for(int i=xx.length-1; i>=0; i--) System.out.print(xx[i]); }}

A10433015 提到...

public class Z { public static void main(String[] args) { String x ="this is an exercise. A happy Day"; System.out.println(x.replace(" ", "")); x=x.replace(" ", ""); x=(x.replace("a", "@")); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4, 9)); x=x.substring(4, 9); char []xx=x.toCharArray(); for(int i=x.length()-1;i>=0;i--) System.out.print(xx[i]); }}

a10433029 提到...



public class exex09 {

public static void main(String[] args) { String X="this is an exercise. A happy Day"; X=X.replace(" ", ""); System.out.println(X); X=X.replace('a','@'); X=X.replace('e','您'); System.out.println(X); X=X.toUpperCase(); System.out.println(X); X=X.substring(4,9); System.out.println(X); char []XX=X.toCharArray(); for(int i=XX.length-1; i>=0; i--) System.out.print(XX[i]); System.out.println();

A10433019 提到...

public class a1204 {

public static void main(String[] args) { String X="this is an exercise. A happy Day"; X=X.replace(" ",""); System.out.println(X); X=X.replace('a','@'); X=X.replace('e','您'); System.out.println(X); X=X.toUpperCase(); System.out.println(X); X=X.substring(4,9); System.out.println(X); char []XX=X.toCharArray(); for(int i=XX.length-1; i>=0; i--) System.out.print(XX[i]); System.out.println(); }

}

}

A10433003 提到...

public class a1204 {

public static void main(String[] args) { String X="this is an exercise. A happy Day"; X=X.replace(" ",""); System.out.println(X); X=X.replace('a','@'); X=X.replace('e','您'); System.out.println(X); X=X.toUpperCase(); System.out.println(X); X=X.substring(4,9); System.out.println(X); char []XX=X.toCharArray(); for(int i=XX.length-1; i>=0; i--) System.out.print(XX[i]); System.out.println(); }

}

A10433007 提到...

public class a1204 {

public static void main(String[] args) { String X="this is an exercise. A happy Day"; X=X.replace(" ",""); System.out.println(X); X=X.replace('a','@'); X=X.replace('e','您'); System.out.println(X); X=X.toUpperCase(); System.out.println(X); X=X.substring(4,9); System.out.println(X); char []XX=X.toCharArray(); for(int i=XX.length-1; i>=0; i--) System.out.print(XX[i]); System.out.println(); }

}

A10433010 提到...

public class a1204 {

public static void main(String[] args) { String X="this is an exercise. A happy Day"; X=X.replace(" ",""); System.out.println(X); X=X.replace('a','@'); X=X.replace('e','您'); System.out.println(X); X=X.toUpperCase(); System.out.println(X); X=X.substring(4,9); System.out.println(X); char []XX=X.toCharArray(); for(int i=XX.length-1; i>=0; i--) System.out.print(XX[i]); System.out.println(); }

}

A10433014 提到...

public class a1204 {

public static void main(String[] args) { String X="this is an exercise. A happy Day"; X=X.replace(" ",""); System.out.println(X); X=X.replace('a','@'); X=X.replace('e','您'); System.out.println(X); X=X.toUpperCase(); System.out.println(X); X=X.substring(4,9); System.out.println(X); char []XX=X.toCharArray(); for(int i=XX.length-1; i>=0; i--) System.out.print(XX[i]); System.out.println(); }

}

A10433036 提到...

public class a1204 {

public static void main(String[] args) { String X="this is an exercise. A happy Day"; X=X.replace(" ",""); System.out.println(X); X=X.replace('a','@'); X=X.replace('e','您'); System.out.println(X); X=X.toUpperCase(); System.out.println(X); X=X.substring(4,9); System.out.println(X); char []XX=X.toCharArray(); for(int i=XX.length-1; i>=0; i--) System.out.print(XX[i]); System.out.println(); }

}

A10433036 提到...

public class a1204 {

public static void main(String[] args) { String X="this is an exercise. A happy Day"; X=X.replace(" ",""); System.out.println(X); X=X.replace('a','@'); X=X.replace('e','您'); System.out.println(X); X=X.toUpperCase(); System.out.println(X); X=X.substring(4,9); System.out.println(X); char []XX=X.toCharArray(); for(int i=XX.length-1; i>=0; i--) System.out.print(XX[i]); System.out.println(); }

}

A10433043 提到...

public class a1204 {

public static void main(String[] args) { String X="this is an exercise. A happy Day"; X=X.replace(" ",""); System.out.println(X); X=X.replace('a','@'); X=X.replace('e','您'); System.out.println(X); X=X.toUpperCase(); System.out.println(X); X=X.substring(4,9); System.out.println(X); char []XX=X.toCharArray(); for(int i=XX.length-1; i>=0; i--) System.out.print(XX[i]); System.out.println(); }

}

A10433039 提到...

public class a1204 {

public static void main(String[] args) { String X="this is an exercise. A happy Day"; X=X.replace(" ",""); System.out.println(X); X=X.replace('a','@'); X=X.replace('e','您'); System.out.println(X); X=X.toUpperCase(); System.out.println(X); X=X.substring(4,9); System.out.println(X); char []XX=X.toCharArray(); for(int i=XX.length-1; i>=0; i--) System.out.print(XX[i]); System.out.println(); }

}

A10433018 提到...

package gg;

public class as9 {

public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); x=x.replace(" ",""); x=x.replace("a","@"); x=x.replace('e','你'); x=x.toUpperCase(); x=x.substring(4,9); System.out.println(x); char []xx=x.toCharArray(); for(int i=xx.length-1;i>=0;i--){// System.out.println(xx[i]); xx[i]=x.charAt(x.length()-1-i); } String x2= new String (xx); System.out.println(x2); }}

A10433024 提到...

package gg;

public class as9 {

public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); x=x.replace(" ",""); x=x.replace("a","@"); x=x.replace('e','你'); x=x.toUpperCase(); x=x.substring(4,9); System.out.println(x); char []xx=x.toCharArray(); for(int i=xx.length-1;i>=0;i--){ xx[i]=x.charAt(x.length()-1-i); } String x2= new String (xx); System.out.println(x2); }}

A10433008 提到...



public class ex1204 {

public static void main(String[] args) { // TODO Auto-generated method stub String X="this is an exercise. A happy Day"; X=X.replace(" ",""); System.out.println(X); X=X.replace('a', '@'); X=X.replace('e', '您'); System.out.println(X); X=X.toUpperCase(); System.out.println(X); System.out.println(X=X.substring(4, 9)); char XX[]=new char[X.length()]; for(int i=0; i<XX.length; i++){ XX[i]=X.charAt(X.length()-1-i); } String X2=new String(XX); System.out.println(X2); StringBuffer Xb=new StringBuffer(X); Xb.reverse(); X=Xb.toString(); System.out.println(X); }

}

A10433006 提到...

public class d1204 {

public static void main(String[] args) { // TODO Auto-generated method stub String X="this is an exercise. A happy Day"; X=X.replace(" ",""); System.out.println(X); X=X.replace('a','@'); X=X.replace('e','您'); System.out.println(X); X=X.toUpperCase(); System.out.println(X); System.out.println(X=X.substring(4,9)); char XX[]=new char[X.length()]; for(int i=0; i<X.length(); i++){ XX[i]=X.charAt(X.length()-1-i); } String X2=new String(XX); System.out.println(X2); StringBuffer Xb=new StringBuffer(X); Xb.reverse(); X=Xb.toString(); System.out.println(X); }}

B10133007 提到...

public class ex02 { public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); System.out.println(x.replace(" ","")); x=x.replace(" ",""); System.out.println(x.replace("a","@")); x=x.replace("a","@"); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4,9)); x=x.substring(4,9); char xx[]=x.toCharArray(); for(int i=xx.length-1; i>=0; i--) System.out.print(xx[i]); }}

A10433028 提到...

public class ex2 { public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); System.out.println(x.replace(" ","")); x=x.replace(" ",""); System.out.println(x.replace("a","@")); x=x.replace("a","@"); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4,9)); x=x.substring(4,9); char xx[]=x.toCharArray(); for(int i=xx.length-1; i>=0; i--) System.out.print(xx[i]); }}

A10433001 提到...

public class ex2 { public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); System.out.println(x.replace(" ","")); x=x.replace(" ",""); System.out.println(x.replace("a","@")); x=x.replace("a","@"); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4,9)); x=x.substring(4,9); char xx[]=x.toCharArray(); for(int i=xx.length-1; i>=0; i--) System.out.print(xx[i]); }}

A10433022 遲 提到...

public class ex2 { public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); System.out.println(x.replace(" ","")); x=x.replace(" ",""); System.out.println(x.replace("a","@")); x=x.replace("a","@"); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4,9)); x=x.substring(4,9); char xx[]=x.toCharArray(); for(int i=xx.length-1; i>=0; i--) System.out.print(xx[i]); }}

A10433004 提到...

public class ex1204 {
public static void main(String[] args) { // TODO Auto-generated method stub String X="this is an exercise. A happy Day"; X=X.replace(" ",""); System.out.println(X); X=X.replace('a', '@'); X=X.replace('e', '您'); System.out.println(X); X=X.toUpperCase(); System.out.println(X); System.out.println(X=X.substring(4, 9)); char XX[]=new char[X.length()]; for(int i=0; i<XX.length; i++){ XX[i]=X.charAt(X.length()-1-i); } String X2=new String(XX); System.out.println(X2); StringBuffer Xb=new StringBuffer(X); Xb.reverse(); X=Xb.toString(); System.out.println(X); }}

A10433004 提到...

public class ex2 { public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); System.out.println(x.replace(" ","")); x=x.replace(" ",""); System.out.println(x.replace("a","@")); x=x.replace("a","@"); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4,9)); x=x.substring(4,9); char xx[]=x.toCharArray(); for(int i=xx.length-1; i>=0; i--) System.out.print(xx[i]); }}

A10433038 提到...

public class ex2 { public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); System.out.println(x.replace(" ","")); x=x.replace(" ",""); System.out.println(x.replace("a","@")); x=x.replace("a","@"); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4,9)); x=x.substring(4,9); char xx[]=x.toCharArray(); for(int i=xx.length-1; i>=0; i--) System.out.print(xx[i]); }}

A10433038 提到...

public class ex2 { public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); System.out.println(x.replace(" ","")); x=x.replace(" ",""); System.out.println(x.replace("a","@")); x=x.replace("a","@"); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4,9)); x=x.substring(4,9); char xx[]=x.toCharArray(); for(int i=xx.length-1; i>=0; i--) System.out.print(xx[i]); }}

A10433038 提到...

public class ex2 { public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); System.out.println(x.replace(" ","")); x=x.replace(" ",""); System.out.println(x.replace("a","@")); x=x.replace("a","@"); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4,9)); x=x.substring(4,9); char xx[]=x.toCharArray(); for(int i=xx.length-1; i>=0; i--) System.out.print(xx[i]); }}

A10433011 提到...

public class ex2 { public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); System.out.println(x.replace(" ","")); x=x.replace(" ",""); System.out.println(x.replace("a","@")); x=x.replace("a","@"); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4,9)); x=x.substring(4,9); char xx[]=x.toCharArray(); for(int i=xx.length-1; i>=0; i--) System.out.print(xx[i]); }}

A10433021 提到 提到...

public class ex2 { public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); System.out.println(x.replace(" ","")); x=x.replace(" ",""); System.out.println(x.replace("a","@")); x=x.replace("a","@"); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4,9)); x=x.substring(4,9); char xx[]=x.toCharArray(); for(int i=xx.length-1; i>=0; i--) System.out.print(xx[i]); }}

B10133189 提到...

public class ex02 { public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); System.out.println(x.replace(" ","")); x=x.replace(" ",""); System.out.println(x.replace("a","@")); x=x.replace("a","@"); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4,9)); x=x.substring(4,9); char xx[]=x.toCharArray(); for(int i=xx.length-1; i>=0; i--) System.out.print(xx[i]); }}

A10433021 提到 提到...

public class ex2 { public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); System.out.println(x.replace(" ","")); x=x.replace(" ",""); System.out.println(x.replace("a","@")); x=x.replace("a","@"); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4,9)); x=x.substring(4,9); char xx[]=x.toCharArray(); for(int i=xx.length-1; i>=0; i--) System.out.print(xx[i]); }}

A10433021 提到 提到...

public class ex2 { public static void main(String[] args) { String x="this is an exercise. A happy Day"; System.out.println(x); System.out.println(x.replace(" ","")); x=x.replace(" ",""); System.out.println(x.replace("a","@")); x=x.replace("a","@"); System.out.println(x.replace("e","您")); x=x.replace("e","您"); System.out.println(x.toUpperCase()); x=x.toUpperCase(); System.out.println(x.substring(4,9)); x=x.substring(4,9); char xx[]=x.toCharArray(); for(int i=xx.length-1; i>=0; i--) System.out.print(xx[i]); }}

Related Posts Plugin for WordPress, Blogger...

熱門文章