Crenox

Array of Hope

May 13th, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. // By: Sammy Samkough
  2. public class ArrayOfHope
  3. {
  4. public static void main(String[] args)
  5. {
  6. // declaration
  7. char ch[];
  8. // create
  9. ch = new char[26];
  10.  
  11. char let = 65;
  12.  
  13. // 1st loop
  14. for(int i = 0; i < 26; i++)
  15. {
  16. ch[i] = let;
  17. let++;
  18. }
  19.  
  20. // 2nd loop
  21. for(int i = 0; i < ch.length; i++)
  22. {
  23. System.out.print(ch[i] + ", ");
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment