Computer Applications
Write the Java expression for (p + q)2.
Java Math Lib Methods
ICSE Sp 2024
75 Likes
Answer
Math.pow((p + q) , 2)
Answered By
48 Likes
Related Questions
Assertion (A): Call by value is known as pure method.
Reason (R): The original value of variable does not change as operation is performed on copied values.
- Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A)
- Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A)
- Assertion (A) is true and Reason (R) is false
- Assertion (A) is false and Reason (R) is true
What will be the output for:
System.out.print(Character.toLowerCase('1'));
- 0
- 1
- A
- true
Evaluate the expression when the value of x = 2:
x = x++ + ++x + x
The following code segment should print "You can go out" if you have done your homework (dh) and cleaned your room (cr). However, the code has errors. Fix the code so that it compiles and runs correctly.
boolean dh = True; boolean cr= true; if (dh && cr) System.out.println("You cannot go out"); else System.out.println("You can go out");