资 源 简 介
package com.pb.Test2;import java.sql.Connection;import java.sql.DriverManager;import java.sql.SQLException;import java.sql.Statement;import java.util.Scanner;public class TestJDBC4 {/*** @param args*/public static void main(String[] args) {// TODO Auto-generated method stubConnection conn=null;Statement st=null;try {Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");conn=DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DataBaseName=epet","sa","sa");System.out.println("连接成功");//操作数据Scanner input=new Scanner(System.in); System.out.println("请输入宠物的健康值"); int health=input.nextInt(); System.out.println("请输入宠物的亲