Java | Straightforward
\nclass Solution\n{\n    public int minimumSum(int num)\n    {\n        int[] dig = new int[4]; // For each digit\n        int cur = 0;\n        while(num > 0) 
```\nclass Solution\n{\n    public int minimumSum(int num)\n    {\n        int[] dig = new int[4]; // For each digit\n        int cur = 0;\n        while(num > 0) // Getting each digit\n        {\n            dig[cur++] = num % 10;\n            num /= 10;\n        }\n        Arrays.sort(dig); // Ascending order\n        int num1 = dig[0] * 10 + dig[2]; // 1st and 3rd digit\n        int num2 = dig[1] * 10 + dig[3]; // 2nd and 4th digit\n        return num1 + num2;\n    }\n}\n```
['Java']