File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 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
rocket mass heater kickstarter
subject: what is compile time constant?