这是一个不错的Java学生管理系统项目案例,希望能够帮到大家的学习吧。

代码如下

package com.student.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException; public class DbUtil {
private String dbUrl="jdbc:mysql://localhost:3306/db_student";
private String user="root";
private String password="123456";
private String jdbcName="com.mysql.jdbc.Driver";
public Connection getCon() throws Exception{
Class.forName(jdbcName);
Connection con=DriverManager.getConnection(dbUrl, user, password);
return con;
}
public void close(Connection con)throws Exception{
if(con!=null){
con.close();
}
}
public static void main(String[] args){
Connection con=null;
try {
con = new DbUtil().getCon();
System.out.println(con);
} catch (Exception e) {
e.printStackTrace();
}finally{
if(con!=null){
try {
con.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
}
}
package com.student.model;

public class Student {
private int id;
private String studentnumber;
private String name;
private String birthday;
private String nativeplace;
private int classid;
private String studentremark; public Student() {
super();
} public Student(String studentnumber, String name, String birthday,
String nativeplace, int classid, String studentremark) {
super();
this.studentnumber = studentnumber;
this.name = name;
this.birthday = birthday;
this.nativeplace = nativeplace;
this.classid = classid;
this.studentremark = studentremark;
} public Student(int id, String studentnumber, String name, String birthday,
String nativeplace, int classid, String studentremark) {
super();
this.id = id;
this.studentnumber = studentnumber;
this.name = name;
this.birthday = birthday;
this.nativeplace = nativeplace;
this.classid = classid;
this.studentremark = studentremark;
} public int getId() {
return id;
} public void setId(int id) {
this.id = id;
} public String getStudentnumber() {
return studentnumber;
} public void setStudentnumber(String studentnumber) {
this.studentnumber = studentnumber;
} public String getName() {
return name;
} public void setName(String name) {
this.name = name;
} public String getBirthday() {
return birthday;
} public void setBirthday(String birthday) {
this.birthday = birthday;
} public String getNativeplace() {
return nativeplace;
} public void setNativeplace(String nativeplace) {
this.nativeplace = nativeplace;
} public int getClassid() {
return classid;
} public void setClassid(int classid) {
this.classid = classid;
} public String getStudentremark() {
return studentremark;
} public void setStudentremark(String studentremark) {
this.studentremark = studentremark;
} }

效果图
<ignore_js_op>

<ignore_js_op>

详细说明:http://java.662p.com/thread-3620-1-1.html

Java学生管理系统项目案例的更多相关文章

  1. Java学生管理系统(详解)

    相信大部分人都有接触过这个 Java 小项目--学生管理系统,下面会分享我在做这个项目时的一些方法以及程序代码供大家参考(最后附上完整的项目代码). 首本人只是个初学Java的小白,可能项目中有许多地 ...

  2. Java学生管理系统(连接数据库查询)超详细

    这几天逼着交Java,借鉴各位师傅的做出来这么个简陋的东西,各位大师傅不要笑我.(学都没有学过Java的我,QAQ~) 下面针对的都是SQL Server系列的连接,如果你使用MySQL那么不必看关于 ...

  3. java学生管理系统

    student类 package cn.itheima.Manag; /** * *标准类 * **/public class Student { //学号 private String id; // ...

  4. Java学生管理系统(IO版)

    图解: cade: student.java /* * 这是我的学生类 */ public class Student { //学号 private String id; //姓名 private S ...

  5. 【Java框架型项目从入门到装逼】第七节 - 学生管理系统项目搭建

    本次的教程是打算用Spring,SpringMVC以及传统的jdbc技术来制作一个简单的增删改查项目,对用户信息进行增删改查,就这么简单. 1.新建项目 首先,打开eclipse,新建一个web项目. ...

  6. java学生管理系统(增、删、改、查功能)

    package mm; import java.util.Scanner;import java.util.ArrayList; class Student1 { private String stu ...

  7. Java开发学生管理系统

    Java 学生管理系统 使用JDBC了链接本地MySQL 数据库,因此在没有建立好数据库的情况下没法成功运行 (数据库部分, Java界面部分, JDBC部分) 资源下载: http://downlo ...

  8. Java案例——学生管理系统

    简单完整的学生管理系统 学生类 public class Student { private String id; private String age; private String name; p ...

  9. Java基础进阶:学生管理系统数组方式分包源码实现,教师管理系统集合和数组两种方式源码实现,图书馆管理系统源码实现,现附重难点,代码实现源码,课堂笔记,课后扩展及答案

    1.案例驱动模式 1.1案例驱动模式概述 (理解) 通过我们已掌握的知识点,先实现一个案例,然后找出这个案例中,存在的一些问题,在通过新知识点解决问题 1.2案例驱动模式的好处 (理解) 解决重复代码 ...

随机推荐

  1. linux free命令(转载)

    来源:http://www.cnblogs.com/peida/archive/2012/12/25/2831814.html free命令可以显示Linux系统中空闲的.已用的物理内存及swap内存 ...

  2. animateWithDuration 动画的速度选择

    + (void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnim ...

  3. XML通過XSD產生CLASS

    步驟一:通過XML獲取XSD 格式:xsd "XML的完整路徑帶文件名" /O:"輸出路徑不帶文件名". C:\Windows\system32>xsd ...

  4. ASPxGridView改变列颜色

    protected void ASPxGridView1_HtmlDataCellPrepared(object sender, ASPxGridViewTableDataCellEventArgs ...

  5. redis命令(转)

    http://redis.readthedocs.org/en/latest/index.html 连接操作相关的命令 quit:关闭连接(connection) auth:简单密码认证 持久化 sa ...

  6. gettimeofday() 获取系统时间,精确到微秒 这个似乎只能在linux 下用,不能在windows 下用

    struct timeval{ long int tv_sec; // 秒数 同time(NULL) 的返回值 long int tv_usec; // 微秒数 10 的6次方 }; struct t ...

  7. [Java] 字符流Reader,读取字符数据

    package test.stream; import java.io.BufferedReader; import java.io.FileNotFoundException; import jav ...

  8. mybatis模板

    因为这里是说mybatis的,所以呢 servlet就不做多说了,代码也不在这里贴出来了. log4j.properties log4j.rootLogger=DEBUG,Console log4j. ...

  9. 封装一个简单好用的打印Log的工具类And快速开发系列 10个常用工具类

    快速开发系列 10个常用工具类 http://blog.csdn.net/lmj623565791/article/details/38965311 ------------------------- ...

  10. Apahce映射网络路径

    要点有两个: 1. 要使用全路径,不要使用映射的网络驱动器.2. 路径之间用斜杠/,不要用反斜杠\. Alias /weili.mobile "//vmware-host/Shared Fo ...