Skip to content

Instantly share code, notes, and snippets.

@crazyhitty
Created April 24, 2016 12:11
Show Gist options
  • Select an option

  • Save crazyhitty/f48e2c010dacf663d50b6490be609d44 to your computer and use it in GitHub Desktop.

Select an option

Save crazyhitty/f48e2c010dacf663d50b6490be609d44 to your computer and use it in GitHub Desktop.

Revisions

  1. crazyhitty created this gist Apr 24, 2016.
    17 changes: 17 additions & 0 deletions print_alphabets_sorted.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    class Main {
    public static void main(String[] args) {
    for(int i=0; i<26; i++){
    System.out.print(getAlphabetsAZ()[i]);
    }
    }

    public static char[] getAlphabetsAZ(){
    char[] alphabetArr=new char[26];
    int x=0;
    for(int i=97; i<123; i++){
    alphabetArr[x]=(char)i;
    x++;
    }
    return alphabetArr;
    }
    }