4 line Java Solution | O(n^2) time complexity
\nclass Solution {\n    public int numOfPairs(String[] nums, String target) {\n        int count=0;\n        int n = nums.length;\n        for(int i=0;i<n;i++) 
```\nclass Solution {\n    public int numOfPairs(String[] nums, String target) {\n        int count=0;\n        int n = nums.length;\n        for(int i=0;i<n;i++) for(int j=0;j<n;j++) if(i!=j && (nums[i]+nums[j]).equals(target)) count++;\n        return count;\n    }\n}\n```
['Java']