Simple java code for beginners
\n# Complexity\n- \n\n# Code\n\nclass Solution {\n    public List<Boolean> prefixesDivBy5(int[] nums) {\n        ArrayList<Boolean> ans = new ArrayList<>();\n  
\n# Complexity\n- \n![image.png](https://assets.leetcode.com/users/images/c0d0819d-7fda-4b6b-bd52-d59bbd45c2e0_1704598577.6489384.png)\n# Code\n```\nclass Solution {\n    public List<Boolean> prefixesDivBy5(int[] nums) {\n        ArrayList<Boolean> ans = new ArrayList<>();\n        int num = 0;\n        for(int i = 0 ; i<nums.length ; i++){\n            num = (num*2 + nums[i])%5;\n            ans.add(num==0);\n        }\n        return ans;\n    }\n}\n```
['Java']