打印26个字母有多少办法?

racewind 2006-01-23 02:05:14
class Word//打印26个字母
{
public static void main(String args[])
{
for(int i=(int)('a');i<(int)('z')+1;i++)
{
System.out.println((char)i);
}
}
}
...全文
298 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
acd123456 2006-01-23
  • 打赏
  • 举报
回复
class Word//打印26个字母
{
public static void main(String args[])
{
for(int i=0;i<26;System.out.println((char)('a' + i++)));
}
}
acd123456 2006-01-23
  • 打赏
  • 举报
回复
class Word//打印26个字母
{
public static void main(String args[])
{
for(int i=(int)('a');i<(int)('z')+1;System.out.println((char)i++));
}
}
acd123456 2006-01-23
  • 打赏
  • 举报
回复
class Word//打印26个字母
{
public static void main(String args[])
{
for(int i=(int)('a');i<(int)('z')+1;System.out.println((char)i++)){}
}
}
jlbqd 2006-01-23
  • 打赏
  • 举报
回复
System.out.println("abcdefg...");
这个估计累了一点~
hellolongbin 2006-01-23
  • 打赏
  • 举报
回复
无数种
  • 打赏
  • 举报
回复
考验想象力么
System.out.println("abcdefg...");

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧