There are several ways to implement multi-threaded synchronization, what is it?
There are several ways to implement multithreading, what is it? How are there several implementations of synchronization?
There are two ways to implement multithreading, that is, inheriting the thread class and implementing Runnable interface synchronization in two ways, namely synchronized,wait and notify
About the path to cookies and the access to cookies?
Cookie c1=new Cookie "CNAME", "C1");
C1.setpath "/myapp");
C1.setMaxAgeInteger.MAX_VALUE);
RESPONSE.ADDCOOKIEC1);
Cookie c2=new Cookie "CNAME", "C2");
C2.setpath "/myapp/servlet");
C2.setMaxAgeInteger.MAX_VALUE);
RESPONSE.ADDCOOKIEC2);
The above code indicates that a cookie with 2 duplicate names has been written to the client, but the path property is not the same.
Which Cookie will the browser bring to the server?
A: This must be determined based on the path to the server resource that the client accesses.
If the path of a resource accessed by a user is/myapp/servlet/someservlet,
Then these 2 cookie browsers will be brought to the server, if the user accesses the path of the resource is/myapp/1jsp,
Then the browser will only bring a 1th cookie over.
There are several ways to implement multi-threaded synchronization, what is it?