Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java beans final?

Status
Not open for further replies.

Adkron

Programmer
Jun 6, 2005
39
0
0
US
I'm working on an internal application, and I'm wondering if I should make my beans final. I made all the methods(getters and setters) final for performance, and it helped a lot. Will making the actuall bean class give me a performance gain?

Amos
Programer/Analyst
United States Postal Service
 
Well, the performance gain comes because the methods are inlined. Let me seriously doubt the performance comes from the final thingie. Have you done any other performance improvements?

Cheers,
Dian
 
I'm reading up on it now. I don't know a lot about the performance enhancements java can do.

Amos
Programer/Analyst
United States Postal Service
 
I'm also fairly sure that declaring a method as a final will not significantly improve performance.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
You can take a look at javaperformancetuning.com, some good tricks there.

I think the best way to know is to try with and without final declarations and compare.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top