![]() |
The Future Is Behind You |
Home | About | Stories | Blog | Poetry | Programming |
Sort an ArrayFill an array with letters and then sort it. import java.util.Arrays; public class SortArray { public static void main(String[] args) { String[] myArray = {"z", "a", "x", "b"}; Arrays.sort(myArray); Arrays.stream(myArray) .forEach(System.out::println); } } Output: a b x z |
Copyright © 2003 - 2021 Kyle Eggleston |
a = b = c |