Computer Applications
Write a difference between unary and binary operator.
Java Operators
ICSE 2012
ICSE 2019
54 Likes
Answer
unary operators operate on a single operand whereas binary operators operate on two operands.
Answered By
36 Likes
Related Questions
Write a Java program to obtain principal amount, rate of interest and time from user and compute simple interest.
A student executes the following code to increase the value of a variable ‘x’ by 2.
He has written the following statement, which is incorrect.
x = +2;What will be the correct statement?
A. x +=2;
B. x =2;
C. x = x +2;- Only A
- Only C
- All the three
- Both A and C
Rewrite the following program segment using logical operators:
if(x > 5) if(x > y) System.out.println(x + y);