aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes local rariable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "local rariable" Watch "local rariable" New topic

local rariable

Timber Lee
Ranch Hand

Joined: Oct 14, 2002
Posts: 157
is the local rariable in servlet thread safe? why?
thank you in advance!

Ranch Hand

Joined: May 30, 2002
Posts: 75
Because every thread gets its own copy of local ,even if multiple threads are accessing a method each thread would have its own copy of local variable.
Ajay Rana
I agree. Here's the link:
subject: local rariable
Similar Threads
String operation
Are variables defined inside a constructor instance or local?
object/collection modification
Resource Local Transactions
Did implicit objects are instance variables or local variables in _jspService