Java Program to Convert long to int - The Coding Shala
Hey there, welcome back to another post. In this post, we are going to learn how to convert long to int in Java.
Java Program to Convert long to int
We can convert long to int using the below ways:
- Using explicit type casting because here we are converting from higher to lower data type so automatic conversion won't happen.
- Using intValue() method of Long class.
Other Posts You May Like
- Java Program to Convert int to long
- Java Program to Find the Sum of Digits of a Number
- Java Program to Find the Sum of N Numbers
- Java Program to Take Array Input
- Java Program to Reverse an Array
Please leave a comment below if you like this post or found some errors, it will help me to improve my content.