Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Will access Modifiers in java enhance the application performance?

 
sriram sundararajan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Access modifiers can restrict the usages of methods and variables within an application. Using this effectively, is considered as a good coding practice or will i be benefited anything from performance wise.

Say i am having a public method in my class, but i am using that method only in that class. If i change this method to private, will it improve my performance?

Similarly if i mark my class as final, no body can extend that, but will it improve the performance?

regards
sriram.
 
W. Joe Smith
Ranch Hand
Posts: 710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think your application will run any faster or more efficiently, but using proper access modifiers makes your code more secure which is always a good thing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic