Java Solution
\nclass Solution {\n    public int numOfPairs(String[] nums, String target) {\n        int pairs = 0;\n        for(int i =0;i<nums.length;i++)\n        {\n     
```\nclass Solution {\n    public int numOfPairs(String[] nums, String target) {\n        int pairs = 0;\n        for(int i =0;i<nums.length;i++)\n        {\n            StringBuilder str = new StringBuilder();\n            str.append(nums[i]);\n            for(int j =0;j<nums.length;j++)\n            {\n                if(i == j)continue;\n                str.append(nums[j]);\n                if(target.equals(str.toString()))pairs++;\n                str.delete(nums[i].length(),str.length());\n            }\n        }\n        return pairs;\n    }\n}\n```
[]