package myapp;

import java.io.IOException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ListServlet extends HttpServlet {
  InputOutPut io=new InputOutPut();

  @Override
  public void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws IOException {
    resp.setContentType("text/plain");
    resp.getWriter().println(io.read().get(8));
  }
}

@@ -402,16 +402,109 @@
 lain%22);%0A
+    List%3CString%3E list=new ArrayList%3C%3E();%0A    list.add(%22String in list%22);%0A    io.write(list);%0A
     resp
@@ -542,9 +542,9 @@
 get(
-8
+0
 ));%0A

Update ListServlet.java