谁能给我一个Java小程序源代码?

来源:百度知道 编辑:UC知道 时间:2024/05/25 04:48:03
我想找一个小的容易看懂的小程序,谢谢大家了!

package com.kenki.emp;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import java.sql.SQLException;
import java.sql.*;

public class emp extends HttpServlet {
private static final String CONTENT_TYPE = "text/html; charset=GBK";

//Initialize global variables
public void init() throws ServletException {
}

//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
String code = request.getParameter("code");
String name = request.getParameter("name");
String pay = request.getParameter("pay");
System.out.println("empcode:"