COUNT THE LASERS IN EACH ROW [JAVA CODE]
\nclass Solution {\n    public int numberOfBeams(String[] bank) {\n List<Integer> list= new ArrayList<>();\n        int count=0,ans=0;\n        for(String s:ban
```\nclass Solution {\n    public int numberOfBeams(String[] bank) {\n List<Integer> list= new ArrayList<>();\n        int count=0,ans=0;\n        for(String s:bank){\n            count=0;\n            for(char c:s.toCharArray()){\n            if(c==\'1\'){\n                count++;\n            }\n           \n       }\n             if(count!=0){\n            list.add(count);\n            } }\n        \n        for(int i=0;i<list.size()-1;i++){\n            ans+=list.get(i)*list.get(i+1);\n        }\n        return ans;\n\n}\n    }\n```\n\t
[]