Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package string_array;
- /**
- * String array problem
- *
- */
- public class Main {
- /**
- * Entry point
- * @param args command line args
- */
- public static void main(String[] args) {
- String[] firstNames = {"George", "Fred", "Sam", "Mary", "Sarah", "Bella", "Joy", "Rita", "Marta", "Sue", "Nancy"};
- //print the names backwards
- for(int i = firstNames.length - 1; i >=0; --i) {
- System.out.print(firstNames[i] + " ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement