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

For the code given below: 1. (2 pt) Identify the issue with…

For the code given below: 1. (2 pt) Identify the issue with loop opertaion and suggest the fix.2. (2 pt) Identify an error with a variable declaration and suggest a fix.3. (2 pts) Identify issue(s) with switch statement and suggest the fix(s).4. (1 pt)  Why scnr.nextLine() is needed on line 11?5. (1 pt) Rewrite line 27 using printf statement to print totalCalories burned with only 2 digits after decimal.6. (2 pts) Explain the order of operation on line 24.