Skip to content

Instantly share code, notes, and snippets.

@jeongwhanchoi
Last active September 15, 2018 10:31
Show Gist options
  • Save jeongwhanchoi/1355dbc065c91333f50d5999c6b7cbfc to your computer and use it in GitHub Desktop.
Save jeongwhanchoi/1355dbc065c91333f50d5999c6b7cbfc to your computer and use it in GitHub Desktop.
public class AddServlet extends HttpServlet
{
protected void doGet(HttpServletRequest req, HttpServletResponse res)
{
int i = Integer.parseInt(req.getParameter("t1"));
int j = Integer.parseInt(req.getParameter("t2"));
int k = i + j;
PrintWriter out = req.getWriter();
out.print(k);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment