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 Applet Stub Interface ?
What does super keyword do?
How do you end a program?
What is functional interface in javatpoint?
What ide should I use for java?
How many bytes is a url?
Can we declare a static variable inside a method?
What is singleton class in ruby?
What is flag in python?
Can we access instance variables within static methods ?
What is string [] args?
Explain the difference between collection api and stream api in java8?
How do you check if two strings are equal in java?
What are the steps that are followed when two computers connect through tcp?
What is the different between get and post?