Casting
1234567891011
public class Main {
public static void main(String[] args) {
short x = 1;
float y = (float) (x + 2.3);
System.out.println(y); // implicit casting
String a = "2"; // string to integer conversion
int b = Integer.parseInt(a);
System.out.println(b);
}
}
Java
INFO