✏️ Explanatory Question

What are the types of casting shown by the following examples?

  1. double x = 15.2;
    int y = (int) x;

  2. int x = 12;
    long y = x;

👁 84 Views
📘 Detailed Answer
🟡 Medium
💡

Answer with Explanation

  1. Explicit Type Casting
  2. Implicit Type Casting