Java学生管理系统项目案例
这是一个不错的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学生管理系统项目案例的更多相关文章
- Java学生管理系统(详解)
相信大部分人都有接触过这个 Java 小项目--学生管理系统,下面会分享我在做这个项目时的一些方法以及程序代码供大家参考(最后附上完整的项目代码). 首本人只是个初学Java的小白,可能项目中有许多地 ...
- Java学生管理系统(连接数据库查询)超详细
这几天逼着交Java,借鉴各位师傅的做出来这么个简陋的东西,各位大师傅不要笑我.(学都没有学过Java的我,QAQ~) 下面针对的都是SQL Server系列的连接,如果你使用MySQL那么不必看关于 ...
- java学生管理系统
student类 package cn.itheima.Manag; /** * *标准类 * **/public class Student { //学号 private String id; // ...
- Java学生管理系统(IO版)
图解: cade: student.java /* * 这是我的学生类 */ public class Student { //学号 private String id; //姓名 private S ...
- 【Java框架型项目从入门到装逼】第七节 - 学生管理系统项目搭建
本次的教程是打算用Spring,SpringMVC以及传统的jdbc技术来制作一个简单的增删改查项目,对用户信息进行增删改查,就这么简单. 1.新建项目 首先,打开eclipse,新建一个web项目. ...
- java学生管理系统(增、删、改、查功能)
package mm; import java.util.Scanner;import java.util.ArrayList; class Student1 { private String stu ...
- Java开发学生管理系统
Java 学生管理系统 使用JDBC了链接本地MySQL 数据库,因此在没有建立好数据库的情况下没法成功运行 (数据库部分, Java界面部分, JDBC部分) 资源下载: http://downlo ...
- Java案例——学生管理系统
简单完整的学生管理系统 学生类 public class Student { private String id; private String age; private String name; p ...
- Java基础进阶:学生管理系统数组方式分包源码实现,教师管理系统集合和数组两种方式源码实现,图书馆管理系统源码实现,现附重难点,代码实现源码,课堂笔记,课后扩展及答案
1.案例驱动模式 1.1案例驱动模式概述 (理解) 通过我们已掌握的知识点,先实现一个案例,然后找出这个案例中,存在的一些问题,在通过新知识点解决问题 1.2案例驱动模式的好处 (理解) 解决重复代码 ...
随机推荐
- border-radius 样式表CSS3圆角属性
border-radius 是CSS3圆角属性,用来实现DIV层的4个边框画成圆角. 一.语法: border-radius : none | <length>{1,4} [/ <l ...
- spring配置定时器的时间设置
时间大小由小到大排列,从秒开始,顺序为 秒,分,时,天,月,年 *为任意 ?为无限制. 具体如下: "0/10 * * * * ?" 每10秒触发 "0 0 12 ...
- Windows和Linux环境下Memcached安装与配置(转)
一.memcached安装配置 windows平台安装 1.memcached-1.2.6-win32-bin.zip下载地址: http://code.jellycan.com/memcached/ ...
- [ActionScript 3.0] Away3D 旋转效果
package { import away3d.containers.View3D; import away3d.entities.Mesh; import away3d.events.MouseEv ...
- Java实现单向链表的增删改查
class List<T> { private class Node { private T data; private Node next; private Node(T data) { ...
- console,和自己定义事件
console.log这个指令是在浏览器控制台输出日志,用来调试程序 跟alert 类似 但不像alert那样会打断程序.
- Regex 例
密码复杂度:数字英文符号Regex r = new Regex("^(?:(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])|(?=.*[A-Z])(?=.*[a-z])(? ...
- [kuangbin带你飞]专题七 线段树
ID Origin Title 228 / 440 Problem A HDU 1166 敌兵布阵 207 / 438 Problem B HDU 1754 I Hate It ...
- inno setup脚本,涵盖了自定义安装界面,调用dll等等应用
; Script generated by the Inno Setup 脚本向导. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETU ...
- Arch Linux 休眠到文件
创建文件: # fallocate -l 4G /swapfile # chmod 600 /swapfile # mkswap /swapfile# swapon /swapfile 编辑/etc/ ...