Answer:
We know that if a no x if divisible by y. than (y) and (x/y) are its factors and if they are prime numbers also , then they will be the prime factors.
Using this concept you can make recursive calls printPrimeFactors(y), printPrimeFactors(x/y).
Explanation:
The code in java is explained below in image using comments before each statement.
The output image is also attached.