Java(26) _打印26个英文字母

package com.bowen.dong;
/**
 * 
 * @author bw
 *
 */
public class Example005 {
   public static void main(String[] args) throws Exception {
      char a[] = new char[26];
      for(int i=0;i<26;i++) {
           a[i]=(char)('A'+i);
           System.out.print(a[i]+" ");
           if(a[i]=='Z') {
               System.out.println("");
           }
      }
   }
}

 

posted @ 2018-10-27 09:47  sunnybowen  阅读(2967)  评论(0编辑  收藏  举报