[JAVA] Easy Solution
\n# \n    class Solution {\n    public int minMaxDifference(int num) {\n        String s = Integer.toString(num);\n        char temp = \'9\';\n        for(char 
\n# \n    class Solution {\n    public int minMaxDifference(int num) {\n        String s = Integer.toString(num);\n        char temp = \'9\';\n        for(char c : s.toCharArray()){\n            if(c != \'9\'){\n                temp = c;\n                break;\n            }\n        }\n        return Integer.parseInt(s.replace(temp, \'9\')) - Integer.parseInt(s.replace(s.charAt(0), \'0\'));\n    }\n}
['Java']