Answer to Question #246908 in Java | JSP | JSF for HLAYISANI

Question #246908

Java Class that returns the sum of two integers, write a JSP code that uses a page directives to call this Java Class


1
Expert's answer
2021-10-05T18:15:15-0400
public class Main {
    public static int sum(int a, int b) {
        return a + b;
    }
}


<HTML>
 <HEAD>
  <TITLE>Sum</TITLE>
 </HEAD>
 <BODY>
  Sum is: <%= Main.sum(1,5) %>
 </BODY>
</HTML>

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS