jQuery in Action, 3rd edition
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Forward reference Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Forward reference" Watch "Forward reference" New topic

Forward reference

Rastogi Manish

Joined: Dec 11, 2006
Posts: 5
Can some body help me below code. It compile properly but it givec compile time error when I comment out SOP with reason illegal forward reference.

Thanks & Regards
Manish Rastogi
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 10003

You are trying to use the variable a before it is declared. The forward referencing rule says that you cannot use a variable on the right hand side of an assignment statement or use it to print something before it can be declared.

Hope this helps.

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Rastogi Manish

Joined: Dec 11, 2006
Posts: 5
Ok Thanks Sankararaj

Manish Rastogi
I agree. Here's the link: http://aspose.com/file-tools
subject: Forward reference
It's not a secret anymore!