用JAVA编写一个APPLET,实现用户输入数据并写入数据库和单个字段的查询

来源:百度知道 编辑:UC知道 时间:2024/05/17 00:00:12
用JAVA编写一个APPLET,使用数据库自定(ACCESS或者SQL SERVER),实现用户输入数据并写入数据库。并实现单个字段的查询。
老师共布置了5个编程题,我做出了4个,这个实在是不会了,明天就要交了,各位帮下忙~~
感激不尽~~~

不知道是不是你想要的

import java.io.*;
import java.util.*;
class str14
{
InputStreamReader stdin=new InputStreamReader(System.in);
BufferedReader bufin=new BufferedReader(stdin);

public static void main(String args[]) throws IOException
{
new str14();//run the application
}

public str14() throws IOException//constructor
{
Hashtable htable=new Hashtable(20,0.75F);
dataBase(htable);
}

public str14(Hashtable htable) throws IOException //override the constructor
{
dataBase(htable);
}

public void dataBase(Hashtable htable) throws IOException
{
int count=htable.size();//get the ammount of the data in htable
int value,id,num;
String key,enter,data;
Enumeration keys=htable.keys();//get all the key in htable
Enumeration elements=htable.elements();//get all the elements in htable
System.out.println("
Has