For the code given below:1. (1 pt) Write an expression to re…

For the code given below:1. (1 pt) Write an expression to replace XXXX on line 7 that reads a line of text from user? 2. (2 pts) Explain the functionality of the code. 3. (1 pt) At the exit from for loop, what does a value of true for variable YYYY mean?4. (1 pt) What would be a more appropriate name for variable YYYY?

Following method is defined in a class named PrimeNumbers wh…

Following method is defined in a class named PrimeNumbers while main() method is in a class named Test. Answer following questions for the code given below: (1 pt)  What change you need to make on line 8 so that we don’t get syntax error when invoking this method from main() method? (1 pt) What is the correct call to invoke this method? (2 pt) There is a logic error on line 11. Rewrite this line with the fix. (1 pt) What is the benefit of the loop condition i