Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on The Final Word On the final Keyword within the Java forums, part of the Software Development category; Final modifier can be applied to four java constructs . 1. Final variables final parameters anonymous local classes 2. Final fields declare constants aggregation vs. Acquaintance enforce atomicity of object ...
|
|||||||
|
|||
|
The Final Word On the final Keyword
Final modifier can be applied to four java constructs . 1. Final variables final parameters anonymous local classes 2. Final fields declare constants aggregation vs. Acquaintance enforce atomicity of object creation declare invariants for performance conclusion on final fields 3. Final methods enforce invariant code for security for performance? 4. Final classes enforce composition over inheritance for security the final modifier can be applied to four java constructs: 1. Variables: a final variable can be set once and only once. 2. Fields: a final field can also be set only once, by the constructor of the class which defines it. 3. Methods: a final method cannot be overridden nor hidden. 4. Classes: a final class cannot be extended.
|
| Sponsored Links |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can a final interface has an abstract method? | kaushalksharma | Java | 4 | 07-28-2008 03:36 AM |
| I want to do final project. | rahmanl | Career Advice | 2 | 04-29-2008 05:27 PM |
| Abstract, final and static keywords | Geek_Guest | Java | 2 | 12-25-2007 09:48 AM |
| Public static final variables in interfaces | ani_lavanya | Java | 1 | 05-02-2007 05:38 AM |
| Which search specification will give the final output | Geek_Guest | Seibel | 0 | 04-03-2007 11:51 AM |