For this Question: Each item in Newton’s menu is assigned a spice level from 1 to 10. Based on the spice level, the item is categorized as:
MILD: If the spice level is less than 4.
MEDIUM: If the spice level is greater than or equal to 4 but less than 7.
HOT: If the spice level is greater than or equal to 7. 
Given that the spice level of an item is X, find the category it lies in.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You have to complete the function <b>Solve()</b> that takes the integer X as parameter.

<b>Constraints :</b>
1 &le; X, &le; 10Output on a new line, the category that the item lies in.Sample Input:-
4
Sample Output:-
MEDIUM

Sample Input:-
1
Sample Output:-
MILD, I have written this Solution Code: class Solution {

    
    public void Solve(int x) {
             if(x>=1 && x<4) 
             System.out.println("MILD");
             else if(x>=4 && x<=6)
               System.out.println("MEDIUM");
               else
                 System.out.println("HOT");
          
    }
    
}
 
, In this Programming Language: Java, Now tell me if this Code is compilable or not?