Answer:
The arithmetic operator is used by the program to perform simple algebraic operations like addition, subtraction, multiplication, division, etc. Relational operators are the ones that are used to validate a relationship between the two operands as if they are equal, greater than, less than, etc.
Answer:
Hi there Rumanruxi! The error is in the if statement "if(userNum = 2)".
Explanation:
The if statement in this Java code is assigning userNum the value of 2 instead of comparing it with the value of 2. For equals comparison we need to write two equals "==" in the statement as: "if (userNum == 2)". This will return true if userNum is 2 otherwise it will return false.