ReverseOrder

Run Settings
LanguageJava
Language Version
Run Command
public class Main { public static void main(String[] args){ String[] cities = {"Atlanta", "Charlotte", "Dallas", "Los Angeles", "New York", "Orlando", "Philadelphia", "Seattle"}; /*reverse the order of the array below */ for (int i = 0; i < cities.length/2; i++){ String temp = cities[i]; cities[i] = cities[cities.length-1-i]; cities[cities.length-1-i] = temp; } //print the result for (int i = 0; i < cities.length; i++){ System.out.println(cities[i]); } } }
Editor Settings
Theme
Key bindings
Full width
Lines