Java Basic Tutorial
Java Advance Tutorial
In Java, type conversion refers to converting data from one type to another.
int to long.Try it yourself
(targetType) valueTry it yourself
String.valueOf() or concatenation.Integer.parseInt() or Double.parseDouble().Try it yourself
In expressions, smaller types (byte, short, char) are automatically promoted to int.
Try it yourself