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 Complile time constant expression. 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 "Complile time constant expression." Watch "Complile time constant expression." New topic

Complile time constant expression.

Mathangi Shankar
Ranch Hand

Joined: Nov 01, 2004
Posts: 56
Hi All,

I have been hearing the word compile time constant expression many a times.Can anybody share examples on this?

Like which is a compile time constant expression and which is not...



--------------------------------<br />SCJP1.4
prajkta patil
Ranch Hand

Joined: Nov 13, 2004
Posts: 49
"the final variables which r defined at the time of declaration " are the compile time constant expression.for example-
class abc{
final int i=3;
in this compiler gets the value of variable i at the time of compilation which is constant so that compiler can use the compile time constant value(i=3) in other expressions for calculations at compile time.
I agree. Here's the link:
subject: Complile time constant expression.
jQuery in Action, 3rd edition