[for | for block] for (int i=0; i<|; i++) {} [prog | Java Program Template] public class |MyProg { /** Code documentation here */ public static void main(String[] args) { /* multi-line and semi-line comments here */ // one-line comments here System.out.println("Hello, world"); } } [servlet | Java Servlet Skeleton] import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class |MyServlet extends HttpServlet { PrintWriter out; public void doGet(HttpServletRequest req, HttpServletResponse res) { try { res.setContentType("text/html"); out = res.getWriter(); String html = "Hello, world"; out.println(html); } catch (Exception e) { e.printStackTrace(); } } public void doPost(HttpServletRequest req, HttpServletResponse res) { try { res.setContentType("text/html"); out = res.getWriter(); String html = "Hello, world"; out.println(html); } catch (Exception e) { e.printStackTrace(); } } } [try | try-catch block] try { | } catch (Exception e) { System.out.println("Unexpected exception"); e.printStackTrace(); } finally {} [while | while block] int i=0; while (i < |) { i++; }