easy code for beginners in java
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```\nclass Solution {\n    public int primePalindrome(int n) {\n     int num=n;\n     while(n>0){\n         if(prime(num)==1 && palindrome(num)==1){\n             return num;\n         }\n             num++;\n              if (num > 10_000_000 && num< 100_000_000) {\n            num = 100_000_000; \n            }\n     }\n     return num;\n        \n    }\n    public static int prime(int num){\n        if(num<=1) return 0;\n        for(int i=2;i<=Math.sqrt(num);i++){\n           if(num%i==0){\n               return 0;\n           }\n        }\n        return 1;\n    }\n    public static int palindrome(int num){\n     if(num<0) return 0;\n     int origin=num;\n     int rev=0;\n     while(num>0){\n         int rem=num%10;\n         rev=rev*10+rem;\n         num=num/10;\n     }\n     if(rev==origin){\n         return 1;\n     }\n     else {\n         return 0;\n     }\n    }\n}\n```
['Java']