Count Pairs Whose Sum is Less than Target || Easy java Solution✔
\n\n# Code\njava []\nclass Solution {\n    public int countPairs(List<Integer> nums, int target) {\n        int n=nums.size();\n        int count=0;\n        fo
\n\n# Code\n```java []\nclass Solution {\n    public int countPairs(List<Integer> nums, int target) {\n        int n=nums.size();\n        int count=0;\n        for(int i=0;i<n-1;i++)\n        {\n            for(int j=i+1;j<n;j++)\n            if(nums.get(i)+nums.get(j)<target)\n            {\n                count++;\n            }\n        }\n        return count;\n    }\n}\n```
['Java']