Are you trying to implement it in Java? From the few lines of code you have provided- I assume you are not familiar with Java. If its a homework question please
DoYourOwnHomework , and you cannot expect anyone here to just give you the program for the same.
The steps which I can think of-
- Find the prime numbers within 10000- You can get the algorithm for this from a lot of places or you can write one yourself.
- Now to find out if there are three 7's you can either- Convert the number into a string and find if it has three 7's or you can find individual digits in the number and see if it has three 7's. Again for the second method there's a standard approach and you can find this algorithm in programs that deal with reversing a number.
So once you have some code and not able to proceed further do let us know and we will help you out.