Get premium membership and access questions with answers, video lessons as well as revision papers.

What are the values of a, b, c, I, j, k after the following java code is executed inti, j, k; double a, b, c; int n =...

      

What are the values of a, b, c, I, j, k after the following java code is executed
inti, j, k;
double a, b, c;
int n = 3;
double y = 2.7;
i = (int)y;
j = (int) (y + 0.6);
k = (int) ( (double)n + 0.2);
a = n;
b = (int)n;
c = (int)y;

  

Answers


Davis
-The values of the int variables i, j, k are 2, 3, 3, and the values of the double variables a, b, c are 3.0, 3.0, 2.0
Githiari answered the question on January 26, 2018 at 12:33


Next: What are the final values of m, n and s in the following java program? Int m, n; String s; String v =’’3’’; m =Integer.parseInt(v + v + ‘’4’’); n...
Previous: There are 2.54 cm in an inch.Declare a constant in java programming language named cmPerInch, with the correct value.Show how it might be used in...

View More Computer Studies Questions and Answers | Return to Questions Index


Learn High School English on YouTube

Related Questions