Which of the following is not a Java reserved word? *
a)Private
b)Break
c)Public
d)Total
Answers
Answered by
0
Answer:
Option (d) Total is correct answer.
Explanation:
Answered by
0
Answer:
Explanation:
Total is not a Java reserved word.
Java reserved words are keywords that cannot be used as identifiers because they are reserved for Java functions or other uses (e.g., variable names, function names, class names). You would receive an error or an unexpected outcome if a reserved term was utilised as a variable.
- Another access specifier in Java that can be used with a class, variable, or function is the private keyword. Any entity that has been declared private can only be accessed within the class itself. It can't be accessed from a class other than that one.
- In Java, the 'break' statement is used to end a loop instantly. The loop iteration stops when a break statement is met inside of a loop, and control instantly moves to the first statement following the loop.
- A member's access is declared to be public with the Java keyword public. All other classes can see members of the public class. This implies that a public field or method can be accessed by any other class. In addition, public fields can be changed by other classes unless they are marked as final.
There is not reserved word 'Total' in Java.Therefore 'Total' which is option(d) is the correct answer.
#SPJ3
Similar questions