Answer Posted / rajender
yes
we should do in jsp declarative tag only.if we specify
variables in declaration tag, it belongs to class.
<%! static int i=0; %>
and u can not define static variable in scriptlet(<% %>).
as we know that we can not declare a static variable in a
method.
| Is This Answer Correct ? | 42 Yes | 5 No |
Post New Answer View All Answers
what is a green thread? : Java thread
When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?
What is string made of?
Can I extend singleton class in java?
What does mean in regex?
What is file in java?
What is var keyword ?
Can you call a method on a null object?
Can you make a constructor final in Java?
Is string an object?
What is meant by class loader? How many types are there? When will we use them?
What is meant by inheritance and what are its advantages?
how come we know the object is no more used in the class?
How can an object be unreferenced?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. Define how can I do so?