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
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread
Which is faster set or list in java?
What is the purpose of default constructor?
What are scriptlets?
What are the 6 functions?
What are the two main uses of volatile in Java?
What means public static?
List some important features of java 10 release?
What is the relationship between clipping and repainting under awt?
How do I get 64 bit java?
Can we have two methods in a class with the same name?
Why call by value prevents parameter value change?
What exceptions occur during serialization?
What are the drawbacks of singleton class?
How can you make sure that your singleton class will always return single instance in multi-threaded environment?