Hi I am very new to web app development. I am creating a Java web app. Safe to assume that the web app will be used by multiple clients at the same time. Inside my app I wish to call a static method. It is a generic method and so there is no need to create an object just for that. Is there a processing penalty by doing that? Since method was declared static will there be only one method for all web clients to share? Will this be a bottle neck? What's the best practice regarding this? Thanks thanks.
If the static method is synchronised or has some form of thread locking, then it will be a bottleneck. But if it is thread-safe, then you should be fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.