【发布时间】:2015-10-29 18:21:05
【问题描述】:
我想创建一个数组来搜索字符串中的元音 像嗯
public class letstrythis{
public static void main(string[]arg){
String[] myStringArray = [1];
String[] myStringArray = {"iwanttotryifthisworks"};
String myStringArray = new String[] {"iwanttotryifthisworks};
if(string=a,e,i,o,u;
for (int i=0;i< string.length; i++){
int intvalue = string[i];
system.out.println(i);
)
}
}
问题,在字符串中搜索元音的函数是什么?
【问题讨论】:
-
欢迎来到 StackOverflow!关于你的问题的几件事。首先,现在很难阅读,因为您的代码根本没有格式化。其次,你的代码不会编译——它有很多语法错误,老实说,它看起来更像伪代码而不是 Java。在 SO,我们帮助有具体实施问题的人 - 尝试为自己编写答案,如果遇到问题,请回来并 ask a good question。我们很乐意为您提供帮助。