Computer Applications
Write two differences between Implicit and Explicit conversion.
Java Operators
12 Likes
Answer
Implicit Conversion | Explicit Conversion |
---|---|
Implicit conversions are automatically performed by the Java compiler. | Explicit conversions are performed by the programmer using the cast operator. |
Example: long a = 98453670116L; long result; int b = 100; result = a + b; | Example: int a = 10; double b = 25.5; float c = (float)(a + b); |
Answered By
5 Likes
Related Questions
A student needs to calculate the average of three numbers
x
,y
, andz
. Which is the correct Java expression for this calculation?What will be the output of the following code?
int x = 9; x -= 2 * --x / x++ % 3; System.out.println("x = " + x);
Write Java expression for:
Evaluate the expression when x is 4:
x += x++ * ++x % 2;