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
Write a Java program to obtain principal amount, rate of interest and time from user and compute simple interest.
A store has purchased some cola cans of various brands. It purchased 50 cans @ ₹15 per can, 30 cans @ ₹20 per can and 40 cans @ ₹21 per can. Write a Java program to compute how much amount did the store pay.