显示英文字母的Java程序


以下是显示A到Z英文字母的示例。

示例

在线演示

public class DisplayingAtoZ {
   public static void main(String args[]){
      char ch;
      System.out.println("List of alphabets are ::");
      for(ch = 'A'; ch <= 'Z'; ch++ ){
         System.out.print(ch+" ");
      }
   }
}

输出

List of alphabets are ::
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

更新于:2020年3月13日

334 次浏览

开启你的职业生涯

完成课程后获得认证

开始学习
广告