What are synchronized methods and synchronized statements?
Answers were Sorted based on User's Feedback
Answer / tarunam verma
Syncronized methods are executed only after a lock is
acheived on the classes or objects specified in the methids
and after that the methids are executed
synchronized statements are the synchronised the bolck
containg the lock on some resource, statment in that block
are called synchronised statements
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / sainaveen
Syncronized methods are executed only after a lock is
acheived on the classes or objects specified in the methids
and after that the methids are executed
Synchronized methods are executed after lock is acieved on
class or object specified in the synchronized statement
Is This Answer Correct ? | 2 Yes | 2 No |
1) which method of the RequestDispatcher cannot be called once the output is sent to the client? a. forward b. include c. both a&b 2) which interface should an object implement to get notified of changes to the list of active sessions in a web application? a. HttpSessionListener b. HttpSessionActivationListener c. HttpSessionAttributeLIstener 3) A user can select multiple locations from a list box on an HTML form, which of the following methods can be used to retrieve all the selected location? a. getParameter() b. getParameterValues() c. getParamValues() 4) which of the following methods should be used to send character text to the client? a. ServletResponse.getWriter() b. ServletResponse.getOutputStream() c. ServletResponse.getOut() 5) which implicit object is always available in a JSP page? a. exception b. session c. out 6) which inclusion mechanism doesn't include the source of the page, rather the output of the page. a. include directive b. jsp:include action c. Bothe a& b 7) which attribute of the page controls whether a page participates in session or not? a. session-allowed b. session c. isSession
What is the purpose of the notify() method?
What is the relation between the infobus and rmi?
What are the implicit objects?
What is the difference between session and entity beans?
How can a dead thread be restarted?
Can we sent objects using Sockets?
how to create Calculator GUI using Gridbaglayout as like as Window Calculator??????????? (Open calculator Go-->Run-->type calc-->Enter)
How u validate date in DD/MM/YY format. and how u validate money in ur jsp
3 Answers Ashok Leyland, Satyam, Tech Mahindra, Tomax,
Why is string immutable in java?
What are preemptive scheduling and time slicing and what is the difference between them?
What is servlet preinitialization?