Java Easy Solution.
\nclass Solution {\n    public String[] divideString(String s, int k, char fill) {\n        int n = s.length();\n        \n        //get the size of string arra
```\nclass Solution {\n    public String[] divideString(String s, int k, char fill) {\n        int n = s.length();\n        \n        //get the size of string array\n        int size = (n + k - 1 ) / k;\n        \n        String[] ans = new String[size];\n        \n        int i = 0;\n        String temp = "";\n        int j = 0;\n        while (i < n) {\n            // when size of temp is smaller than k\n            if (temp.length() < k) {\n                temp += s.charAt(i); \n                i++;\n            } else if (temp.length() == k) {\n                //storing k sized group in ans arry\n                ans[j] = temp;  \n                j++; \n                temp = new String();\n            } \n        }\n        ans[j] = temp; \n        // get last string to check whether it is of size k or not\n        temp = ans[size - 1];\n        \n        //if length of temp is not k then fill it\n        if (temp.length() != k) {\n            i = 0;\n            n = temp.length();\n            j = k - n;\n            while (j -- > 0) {\n                temp += fill;\n            }\n             //putting filled string back into ans array\n            ans[size - 1] = temp;\n        }\n        //returning ans\n        return ans;\n    }\n}\n```
['Java']