Computer Science
Predict the return data type of the following:
int p; double q;
r = p+q;
System.out.println(r);
Values & Data Types Java
53 Likes
Answer
Return data type is double.
Answered By
18 Likes
Related Questions
A non-primitive data type is also referred to as reference type. Explain Why?
Predict the return data type of the following:
float m; p = m/3*(Math.pow(4,3)); System.out.println(p);
Explain the term type casting.
What are the resulting data type of the following explicit conversions?
int i; float f; double d; short s; char c; byte b;
(a) (float) i/b + d;
(b) (int)f*d + c/s;
(c) (char)i + f - b*d;
(d) (double) (f/i)*c + s;
(e) (char) d + b/i - f*s;