Showing posts with label type-casting. Show all posts
Showing posts with label type-casting. Show all posts

24 September 2020

How type-casting works in Java.


Welcome to another tutorial on the "How to code in Java" tutorial series. In the last tutorial, we have gone through on what arrays are and how to use them. In this tutorial, we'll be going through on how type casting works in Java. Because there are many different types of data types in a programming language. Sometimes you will find yourself in a situation where the variables or values are not compatible with each other while assigning the values into a variable. That's when type-casting help us to solve the problem for us.