index.jsp
<html> <body> <h2> <% int a=20; int b=10; int c = a+b; out.println("result is :" +c); %> </h2> </body> </html>
Output:
Here the developer used three variables a, b, c where c is used to add two values.
 compare.jsp
<% int a = 20; int b = 10; if(a>b) out.println("a is bigger"); else out.println("b is bigger"); %>
Output:
It displays the bigger element.