单点登录,java实现
可以直接通过玉符科技IDAAS平台来实现单点登录,支持所有的标准协议,如果是老旧或者自研的系统,也有SDK去适配所有的开发语言,不止是java。
什么是JSP,JAVA又是什么各有什么作用呢
java嵌入到html语言中就成了jsp,它使得原有的静态网页动态化,使网页编程分工细化,使得美工人员不需很专业的java知识;同时jsp的底层是通过java类servlet来实现的。
java编写学生成绩管理系统
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Admin {
public static void main(String args) throws IOException, ClassNotFoundException {
Scanner in = new Scanner(System.in);
int studentNum = 5;
List《Student》 result = new ArrayList《Student》();
for (int i = 0; i 《 studentNum; i++) {
Student bean = new Student();
System.out.print(“输入第“ + (i + 1) + “个学生学号:“);
bean.setNo(in.next());
System.out.print(“输入第“ + (i + 1) + “个学生姓名:“);
bean.setName(in.next());
System.out.print(“输入第“ + (i + 1) + “个学生数学成绩:“);
bean.setShuxue(in.nextDouble());
System.out.print(“输入第“ + (i + 1) + “个学生语文成绩:“);
bean.setYuwen(in.nextDouble());
result.add(bean);
}
while (true) {
System.out.println(“1.保存到文件;2.总成绩;3.平均成绩;4.不及格比例;5.及格比例;6,优良比例;0.退出.“);
int i = in.nextInt();
if (i == 0) {
System.exit(0);
}
if (i == 1) {
save(result);
}
if (i == 2) {
for (int j = 0; j 《 result.size(); j++) {
Student s = result.get(j);
System.out.println(“学生“ + s.getName() + “的总成绩是:“ + s.all());
}
}
if (i == 3) {
int jigeSum = 0;
for (int j = 0; j 《 result.size(); j++) {
Student s = result.get(j);
if (!s.isJige()) {
jigeSum++;
}
}
System.out.println(“不及格比例:“ + jigeSum + “/“ + result.size());
}
if (i == 4) {
// 篇幅受限,自行开发
}
if (i == 5) {
// 篇幅受限,自行开发
}
}
}
private static void save(List result) throws IOException {
FileOutputStream fs = new FileOutputStream(“d:/a.txt“);
ObjectOutputStream os = new ObjectOutputStream(fs);
os.writeObject(result);
os.flush();
os.close();
fs.close();
}
}
class Student implements Serializable {
private String no;
private String name;
private double shuxue;
private double yuwen;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNo() {
return no;
}
public void setNo(String no) {
this.no = no;
}
public double getShuxue() {
return shuxue;
}
public void setShuxue(double shuxue) {
this.shuxue = shuxue;
}
public double getYuwen() {
return yuwen;
}
public void setYuwen(double yuwen) {
this.yuwen = yuwen;
}
public double all() {
return shuxue + yuwen;
}
public double avg() {
return all() / 2;
}
public boolean isJige() {
return avg() 》 60;
}
}
-单点登录