S
S
Sergey Sergey2021-06-09 14:33:16
Java
Sergey Sergey, 2021-06-09 14:33:16

With what sorting of an array is it possible to get a change in the order of digits in an array during compilation?

public class WorkDay extends Day {
    private int[] d = { 11, 12, 13, 14, 41, 51, 21, 22, 23, 24, 42, 31, 32, 33, 34, 43 };
    public WorkDay(){
        super();
        this.d = d;
    }
    public void setD(int[]d){
        this.d = d;
    }
    public int[] getD(){
        return d;
        }
public int[] WorkDayOne()  {
        int x = 1;
        for(; x < d.length; x++){
            System.out.println("Бригада 1 ");
        System.out.println(d[x]);    //     private int[] d = { 23, 24, 42, 31, 32, 33, 34, 43, 11, 12, 13, 14, 41, 51, 21, 22, };
            }
        return null;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Antony, 2021-06-09
@RiseOfDeath

When compiled, the order of the numbers in the array will be as written in the program code (i.e. 11, 12, 13, 14, 41, 51, 21, 22, 23, 24, 42, 31, 32, 33, 34, 43 ) and will not change until you change it in the source code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question