"case expressions must be constant expressions "..Why?
Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Saibabaa Pragada wrote:x4 is not a case expression here ? I see the value of 8 is assigned to x4.
Henry Wong wrote: Saibabaa Pragada wrote:x4 is not a case expression here ? I see the value of 8 is assigned to x4. Integer objects are not defined as a type to be treated as a compile time constant -- so... no. Henry
Henry Wong wrote:
Saibabaa Pragada wrote:That means, Auto-unboxing happens at Runtime and not at compile time..Is that statement right ?