Last active
January 3, 2016 10:19
-
-
Save GrantSchiller/8449122 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reverses an array of integers. | |
public class reversearray { | |
public static void main(String[] args){ | |
String input = "I was the shadow of the waxwing slain By the false azure in the windowpane I was the smudge of ashen fluff--and I Lived on, flew on, in the reflected sky, And from the inside, too, I'd duplicate Myself, my lamp, an apple on a plate: Uncurtaining the night, I'd let dark glass Hang all the furniture above the grass, And how delightful when a fall of snow Covered my glimpse of lawn and reached up so As to make chair and bed exactly stand Upon that snow, out in that crystal land!"; | |
char[] inputArray = input.toCharArray(); | |
for (int i = inputArray.length-1; i >= 0 ; i--){ | |
System.out.print(inputArray[i]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment