aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes what is compile time constant? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "what is compile time constant?" Watch "what is compile time constant?" New topic
Author

what is compile time constant?

rohit shekhar
Ranch Hand

Joined: Mar 05, 2010
Posts: 32
The case constant must be a compile time constant!

Code :-

Q. Both variables are being initialized before use. And I think both have value before compilation. Then why b is not compile time constant.

Ref. SCJP java 6 study guide. Page 336
Rameshwar Soni
Ranch Hand

Joined: Feb 03, 2011
Posts: 247
There is a good post from Henry Wong about What is compile time constant and it is here
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: what is compile time constant?