这是一个不错的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. 常见数组&字符串API及其应用场景总结

    数组API: String(arr):将arr中每个元素转化为字符串,逗号连接     场景:用于鉴别数据有没有修改等. ps:String是万能的   toString 只能转换除null和unde ...

  2. Guava 8-区间

    范例 List scores; Iterable belowMedian =Iterables.filter(scores,Range.lessThan(median)); ... Range val ...

  3. fatal error C1853: '*.pch' is not a precompiled header file created with this compile

    在菜单下选择Build--->点击Rebuild All,如果不起作用,你可以先把Debug或者Release中的文件删除,然后再试.

  4. 用jQuery之后,之前javascript的一些方法就不能用了吗

    用jQuery之后,之前javascript的一些方法就不能用了吗? 比如$("#btn").onclick = function(){}这种用法?或者$("#btn&q ...

  5. windows 下使用 zip安装包安装MySQL 5.7

    以下内容参考官方文档:http://dev.mysql.com/doc/refman/5.7/en/windows-start-command-line.html 解压缩zip到D:\mysql-5. ...

  6. 源码解读—LinkedList

    学习了一下linkedList的源码,做下记录. java底层实现的是双向环链表,程序定义了一个header,来保存头结点,header.next指向最后一个节点(最后插入到),header.prev ...

  7. nyoj 79 导弹拦截

    点击打开链接 拦截导弹 时间限制:3000 ms  |  内存限制:65535 KB 难度:3 描述 某国为了防御敌国的导弹袭击,发展中一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发 ...

  8. SSH连接问题

    新安装的ubuntu14.04无法使用root用户ssh连接,显示ssh root permission denied 解决方法: /etc/ssh/sshd_confg: PermitRootLog ...

  9. 解决“C:\Windows\System32\ntdll.dll”。无法查找或打开 PDB 文件问题

    这些提示的问题完全没有必要去理会,因为一般情况下你点击本地windows调试,会报出这样问题很正常. 网上一些介绍什么要去选项卡栏勾选window连接器什么鬼,不建议用该方式,一旦你勾选那个方式虽然不 ...

  10. 【LeetCode】84. Largest Rectangle in Histogram

    Largest Rectangle in Histogram Given n non-negative integers representing the histogram's bar height ...