What is type casting in Java?

17. What is type casting in Java?

  1. It is converting type of a variable from one type to another
  2. Casting variable to the class
  3. Creating a new variable
  4. All of these

Answer: A) It is converting type of a variable from one type to another

Explanation:

Type casting is when you assign a value of one primitive data type to another type.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.