JAVA Easy Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    public List<List<Integer>> findPrimePairs(int n) {\n\n        boolean[] isPrime = new boolean[n+1];\n        Arrays.fill(isPrime, true);\n\n        isPrime[0] = false;\n        isPrime[1] = false;\n\n        for(int i=2;i<=n;i++)\n        {\n            if(isPrime[i])\n            {\n                for(int j=2*i;j<=n;j+=(i))\n                {\n                    isPrime[j] = false;\n                }\n            }\n        }\n\n        List<Integer> primes = new ArrayList<>();\n\n        for(int i=0;i<=n;i++)\n        {\n            if(isPrime[i])\n            {\n                primes.add(i);\n            }\n        }\n\n        List<List<Integer>> ans = new ArrayList<>();\n\n        int size = primes.size();\n\n        int i=0;\n        int j = size-1;\n\n        while(i<=j)\n        {\n            int x = primes.get(i);\n            int y = primes.get(j);\n\n            if(x+y == n)\n            {\n                List<Integer> temp = new ArrayList<>();\n                temp.add(x);\n                temp.add(y);\n\n                ans.add(temp);\n\n                i++;\n                j--;\n            }\n            else if(x+y>n)\n            {\n                j--;\n            }\n            else\n                i++;\n        }\n        \n        return ans;\n    }\n}\n```
['Java']