Question: please do all. 10. [after $3.15 ] Write the following mathematical expressions as legal Java expressions: a. (4n/5)3 b. (7.5x(3.5+y))/(18x) 11. [after $3.16] Assume this:
![as legal Java expressions: a. (4n/5)3 b. (7.5x(3.5+y))/(18x) 11. [after \$3.16] Assume](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2e8c3de3d6_33166f2e8c36f131.jpg)
10. [after $3.15 ] Write the following mathematical expressions as legal Java expressions: a. (4n/5)3 b. (7.5x(3.5+y))/(18x) 11. [after \$3.16] Assume this: int a=7 double b=0.4 Evaluate each of the following expressions by hand. Show your work, using a separate line for each evaluation step. Check your work by writing and executing a program that evaluates these expressions and outputs the results. a. a+3/a b. 25/((a4) b) c. a/ba d. a %22% a 12. [after \$3.19] Type Casting: Assume the following declarations: int integer; double preciseReal; float sloppyReal; long bigInteger; Rewrite those of the following statements which would generate a compile-time error using an appropriate cast that makes the error go away. Do not provide a cast for any statement which the compiler automatically promotes. integer = preciseReal sloppyReal = integer; bigInteger = sloppyReal; precise Real = bigInteger; integer = bigInteger; sloppyReal = bigInteger; biginteger = preciseReal; biginteger = integer; integer = sloppyReal; preciseReal = sloppyReal; sloppyReal = preciseReal; preciseReal = integer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
