This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "what is compile time constant?" Watch "what is compile time constant?" New topic

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
I agree. Here's the link:
subject: what is compile time constant?
It's not a secret anymore!