首页题目详情

统计一个字符串中中英文字母和数字的个数。

问答题
2020-02-27 11:18:36
0278
参考答案: 统计一个字符串中中英文字母和数字的个数。 public class ExamDemo {        public static void main(String[] args) {               String str = args[0];               int i;               int numCount = 0, unicodeCount = 0, letterCount = 0;                             for (i = 0; i < str; i++) {                      if (str.charAt(i) >= '0' && str.charAt(i) <= '9')                             numCount++;                    &nb...
查看答案
 参考答案
科目:JAVA程序设计
学科:计算机科学与技术