java编程,输入一段英文字母,将每个单词的首字母转换为大写字母.例如,I am very glad to see you 的转换结果为 I Am Very Glad To See You这是我的编程:import java.io.*;import java.util.StringTokenizer;public class TTTe
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 05:51:35
java编程,输入一段英文字母,将每个单词的首字母转换为大写字母.例如,I am very glad to see you 的转换结果为 I Am Very Glad To See You这是我的编程:import java.io.*;import java.util.StringTokenizer;public class TTTe
java编程,输入一段英文字母,将每个单词的首字母转换为大写字母.
例如,I am very glad to see you 的转换结果为 I Am Very Glad To See You
这是我的编程:
import java.io.*;
import java.util.StringTokenizer;
public class TTTest {
public static void main(String args[]){
try{
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
String s=in.readLine();
StringBuffer s1=new StringBuffer();
StringTokenizer st=new StringTokenizer(s);
while(st.hasMoreTokens()){
char c=(st.nextToken()).charAt(0);
if(c>='a'&&c
java编程,输入一段英文字母,将每个单词的首字母转换为大写字母.例如,I am very glad to see you 的转换结果为 I Am Very Glad To See You这是我的编程:import java.io.*;import java.util.StringTokenizer;public class TTTe
在你的基础上修改得
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class TTTest {
public static void main(String args[]) {
try {
BufferedReader in = new BufferedReader(new InputStreamReader(
System.in));
String s = in.readLine();
StringBuffer s1 = new StringBuffer();
StringTokenizer st = new StringTokenizer(s);
while (st.hasMoreTokens()) {
String str = st.nextToken();
char c = (str).charAt(0);
if (c >= 'a' && c