java-已知字符串:“this is a test of java“.1.统计该字符串中字母s出现的次数2.将该字符串的倒叙输出

已知字符串:“this is a test of java“.

1.统计该字符串中字母s出现的次数

2.将该字符串的倒叙输出 

public abstract class text1 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		String s="this is a test of java";//原字符串
		int count=0;
		for(int i=0;i=0;i--) {//遍历倒序输出
			System.out.print(c[i]);
		}
	}

}

java-已知字符串:“this is a test of java“.1.统计该字符串中字母s出现的次数2.将该字符串的倒叙输出_第1张图片

你可能感兴趣的:(Java,eclipse,java)