Java 1 Liner + Standard Solution
\npublic String convertTo7(int num) {\n    return Integer.toString(num, 7);\n}\n\n\nNot using standard library:\n\n\n    public String convertTo7(int num) {\n  
```\npublic String convertTo7(int num) {\n    return Integer.toString(num, 7);\n}\n```\n\nNot using standard library:\n\n```\n    public String convertTo7(int num) {\n        if (num == 0) return "0";\n        String res = "";\n        boolean isNeg = num < 0;\n        while (num != 0) {\n            res = Math.abs((num % 7)) + res;\n            num /= 7;\n        }\n        return isNeg ? "-" + res : res;\n    }\n```
[]