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;

Short Answer
Views 33

Answer:

  1. Explicit Type Casting
  2. Implicit Type Casting

Related Articles:

This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Java Programming Language, click the links and dive deeper into this subject.

Join Our telegram group to ask Questions

Click below button to join our groups.