Creating a Method
<HTML> <HEAD> <TITLE>Creating a Method</TITLE> </HEAD> <BODY> <H1>Creating a Method</H1> <%! int addem(int op1, int op2) { return op1 + op2; } %> <% out.println("2 + 2 = " + addem(2, 2)); %> </BODY> </HTML>