Run ❯
Get your
own Java
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
import java.util.Arrays; public class Main { public static void main(String[] args) { String[] cars = {"Volvo", "BMW", "Tesla", "Ford", "Fiat", "Mazda", "Audi"}; Arrays.sort(cars); for (String i : cars) { System.out.println(i); } } }
Audi
BMW
Fiat
Ford
Mazda
Tesla
Volvo