ใช่ ตัวแปรสามารถดาวน์คาสต์ (downcast) ไปเป็นตัวแทนช่วงล่าง (lower range substitute) ได้โดยการแคสต์ (casting) อาจนำไปสู่การสูญเสียข้อมูล แม้จะเป็นเช่นนั้น ดูตัวอย่างด้านล่าง:
ตัวอย่าง
public class Tester { public static void main(String[] args) { int a = 300; byte b = (byte)a; System.out.println(b); } }ผลลัพธ์
จะพิมพ์ผลลัพธ์เป็น
44