Java实验5字符串.docVIP

  • 29
  • 0
  • 约2.96千字
  • 约 4页
  • 2017-06-12 发布于北京
  • 举报
班级: 姓名: 学号: 座位号 实验:实验目的: 掌握类的使用方法 实验要求和过程 格式现在是: 201年月日 星期 14时20分 import java.util.Calendar; public class One { public static void main(String[] args) { Calendar c=Calendar.getInstance(); System.out.println(String.format(现在是:%1$tY年%1$tm月%1$te日 %1$tA %1$tH时%1$tM分, c)); } } 编写程序,当给出一个英文字符串,能够统计其中大写字母、小写字母、数字、空格及其他字符的个数,并且分别输出统计数据,如果碰到了”\n”则终止统计。”lsdj;287592Ldkei837;\nssdjIJ%H sla23h5235;sldjfl” // 实验结果: // 大写字母个数为:1 // 小写字母个数为:8 // 数字个数为:9 // 空格个数为:0 // 其他字符个数为:2 public class Two { public static void main(String[] args) { String s = lsdj;287592Ldke

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档