This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv 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 REST with Spring (video course) this week in the Spring 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
Don't get me started about those stupid light bulbs.
subject: what is compile time constant?
It's not a secret anymore!