suppose I have a service written in Java:
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
Then I deploy this piece of code to a service (one instance). Suppose multiple users are using this server the same time, try to run this main function the same time. (Note: there is no explicit specification of using multi-threads)
- Will this main method be executed the same time by multiple users?
- Or the server has to accept users requests in a sequence and process the request one by one, and then, actually only one user can call the main method at a time.
I think 1. is false and 2. is true, right? Thanks