mencetak array dalam urutan menurun


public class Sample {
    public static void main(String[] args) {

        String roles[] = { "admin", "customer", "cashier", "manager" };
        for (int x = roles.length - 1; x > -1; x--) {
            System.out.println(roles[x]);
        }
    }
}
Fernandez, Jasmine M.