>
Exams
>
Computer Science & Information Technology
>
Web Technologies
>
which is the correct syntax for declaring a variab
Question:
Which is the correct syntax for declaring a variable in JSP?
Show Hint
Use <%! %> for declarations and <%= %> for expressions in JSP.
TS PGECET - 2024
TS PGECET
Updated On:
May 26, 2025
<%= declaration %>
<% declaration %>
<%! declaration %>
<% \# declaration %>
Hide Solution
Verified By Collegedunia
The Correct Option is
C
Solution and Explanation
In JSP, the correct way to declare variables and methods is using the declaration tag: <%! ... %>
This adds the code to the servlet's class level, making it accessible throughout the servlet.
Download Solution in PDF
Was this answer helpful?
0
0
Top Questions on Web Technologies
Which of the following Open Source IDE helps to create project in PHP, Rails, Ruby or Web?
Gujarat Class XII Board - 2026
Computer Studies
Web Technologies
View Solution
Who has developed Amaya web editor?
Gujarat Class XII Board - 2026
Computer Studies
Web Technologies
View Solution
Which of the following protocol can transfer the webpages from our computer to the web host?
Gujarat Class XII Board - 2026
Computer Studies
Web Technologies
View Solution
Which of the following is a variable that is stored on the user’s computer?
Gujarat Class XII Board - 2026
Computer Studies
Web Technologies
View Solution
Which of the following is a free open source web development IDE?
Gujarat Class XII Board - 2026
Computer Studies
Web Technologies
View Solution
View More Questions
Questions Asked in TS PGECET exam
Which of the following correctly describes the TCP/IP model?
TS PGECET - 2025
Computer Networks
View Solution
In which year was the Earth Summit (Rio Conference) held?
TS PGECET - 2025
Environmental pollution
View Solution
A bag contains 3 red and 2 blue balls. Two balls are drawn without replacement. What is the probability that both are red?
TS PGECET - 2025
Probability
View Solution
Which of the following techniques is primarily used for the synthesis of carbon nanotubes?
TS PGECET - 2025
Strength of Materials
View Solution
Which of the following materials exhibits superparamagnetism at the nanoscale?
TS PGECET - 2025
Strength of Materials
View Solution
View More Questions