Computer Applications
Rewrite the following statements without using shorthand operators.
a. p /= q
b. p -= 1
c. p *= q + r
d. p -= q - r
Java Operators
47 Likes
Answer
a. p = p / q
b. p = p - 1
c. p = p * (q + r)
d. p = p - (q - r)
Answered By
23 Likes
Related Questions
Determine the output of the following program.
public class Test { public static void main(String[] args) { int a = 1, b = 2; System.out.println("Output1: " + a + b); System.out.println("Output2: " + (a + b)); } }
Write the Java expression for the following:
What is the difference between the following two statements in terms of execution? Explain the results.
x -= 5;
x =- 5;Write the Java expression for the following: