---
title: "What is casting:"  
description: "What is casting:"  
author: "Pushpendra Singh"  
published: 2010-10-25  
updated: 2020-09-22  
canonical: https://www.mindstick.com/interview/165/what-is-casting  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What is casting:

Casting refers to changing an entity of one datatype into another. This is important for the type conversion in developing any application. If you will store a int value into a byte variable directly, this will be illegal operation. For storing your calculated int value in a byte variable you will have to change the type of resultant data which has to be stored.

## Answers

### Answer by Pushpendra Singh

Casting refers to changing an entity of one datatype into another. This is important for the type conversion in developing any application. If you will store a int value into a byte variable directly, this will be illegal operation. For storing your calculated int value in a byte variable you will have to change the type of resultant data which has to be stored.


---

Original Source: https://www.mindstick.com/interview/165/what-is-casting

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
