int n = 5; char c = n;
但以下编译
char c = 5;
在这两种情况下,我不只是为char分配一个整数值吗?
另见JLS. Chapter 5. Conversions and Promotions.