This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Complile time constant expression.
It's not a secret anymore!