Transformar em um array sem duplicatas

Crie uma função que ordene um array de inteiros em ordem crescente e remova todos os valores duplicados.

Exemplos

Program.setify(new int[] { 1, 3, 3, 5, 5 }) ➞ new int[] { 1, 3, 5 }

Program.setify(new int[] { 4, 4, 4, 4 }) ➞ new int[] { 4 }

Program.setify(new int[] { 3, 3, 3, 2, 1 }) ➞ new int[] { 1, 2, 3 }

Observações

Retorne um array, não um Set.