写一个java程序,创建一个元音字母set,计数显示输入文件中所有元音字母的数量总和 谢谢给位大大了
2个回答
展开全部
import java.util.*;
/**
*
* @author idle~
*/
public class A {
/** Creates a new instance of A */
public A() {
StringBuffer stringbuffer = new StringBuffer();
int i = (int)(Math.random()*20);
for(int j = 0; j < i;j++){
char c = (char)(Math.random()* 26 + 'A');
if(c != 'A' && c != 'O' && c != 'I' && c!= 'E' && c != 'U' )
stringbuffer.append(c);
}
System.out.println(stringbuffer.toString());
}
public static void main(String[] args) {
new A();
}
}
/**
*
* @author idle~
*/
public class A {
/** Creates a new instance of A */
public A() {
StringBuffer stringbuffer = new StringBuffer();
int i = (int)(Math.random()*20);
for(int j = 0; j < i;j++){
char c = (char)(Math.random()* 26 + 'A');
if(c != 'A' && c != 'O' && c != 'I' && c!= 'E' && c != 'U' )
stringbuffer.append(c);
}
System.out.println(stringbuffer.toString());
}
public static void main(String[] args) {
new A();
}
}
展开全部
import java.util.*;
/**
*
* @author idle~
*/
public class A {
/** Creates a new instance of A */
public A() {
StringBuffer stringbuffer = new StringBuffer();
int i = (int)(Math.random()*20);
for(int j = 0; j < i;j++){
char c = (char)(Math.random()* 26 + 'A');
if(c != 'A' && c != 'O' && c != 'I' && c!= 'E' && c != 'U' )
stringbuffer.append(c);
}
System.out.println(stringbuffer.toString());
}
public static void main(String[] args) {
new A();
}
}
/**
*
* @author idle~
*/
public class A {
/** Creates a new instance of A */
public A() {
StringBuffer stringbuffer = new StringBuffer();
int i = (int)(Math.random()*20);
for(int j = 0; j < i;j++){
char c = (char)(Math.random()* 26 + 'A');
if(c != 'A' && c != 'O' && c != 'I' && c!= 'E' && c != 'U' )
stringbuffer.append(c);
}
System.out.println(stringbuffer.toString());
}
public static void main(String[] args) {
new A();
}
}
追问
这个不行哦 需要更给力的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询