Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8499331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:38:16+00:00 2026-06-11T00:38:16+00:00

I was wondering what the implications are for using static methods in a Java

  • 0

I was wondering what the implications are for using static methods in a Java EE application.

For example: There is a class that handles converting of dates, reordering of strings etc.
All methods in this class are static.
These methods are used by Servlets.

Does this mean that the static methods need to be thread safe (in that if many users are using the application at the same time and are accessing the static method at the same time that there could be some issues)?

Edit I would like to know about this in the context of a web application – are two users going to hit the static methods at the same time and mess with each others result (of the static method)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:38:17+00:00Added an answer on June 11, 2026 at 12:38 am

    accessing the methods in parallel is fine, as long as there are not shared class variables; e.g. if the method declares its own stuff, you’re good:

    public static void thing() {
        String x = "";
        // do stuff with x
    }
    

    The above is fine.

    String x = "";
    
    public static void thing() {
        // do stuff with x
    }
    

    This one isn’t.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I realize that, generally speaking, there are performance implications of using reflection. (I myself
I was wondering if there were any performance implications between using TPL TaskFactory.FromAsync and
I am wondering if there are performance implications of multiple .Where() statements. For example
Wondering if there is any way to get the lambda expressions that result from
Wondering if there is a good way to generate temporary URLs that expire in
I was wondering what the performance implications are of using std::time(0) to seed random
I'm writing a ruby on rails application using mongoid and I'm wondering about the
I was wondering what were the hidden performance implications of using the Database object
I am using AsyncTask and wondering what are the implications of passing the arguments
Wondering is there a function in javascript without jquery or any framework that allows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.