This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Variables inside a final class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Variables inside a final class" Watch "Variables inside a final class" New topic
Author

Variables inside a final class

Thillai Sakthi
Ranch Hand

Joined: Jun 17, 2000
Posts: 102
We know that all methods inside a final class are implicitly final. what happens to the variables (data members) declared inside this class. Will they also be considered as final? Pls clarify.
------------------

Regards,
Shakthi
Thandapani Saravanan
Ranch Hand

Joined: Oct 17, 1999
Posts: 117
Final class can not be sub-classed. Data members inside a final class are not implicitly final. Try this:


Saravanan
Thillai Sakthi
Ranch Hand

Joined: Jun 17, 2000
Posts: 102
Yeah the program what u had given works. Thanks.
 
Consider Paul's rocket mass heater.
 
subject: Variables inside a final class