java做成绩查询代码_Java编写的成绩查询系统

采用菜单形式,1)该系统主要处理字符串的相关信息。

2)完成以下的操作:初始化字符串、获得字符串长度、在字符串中查找一个字符、在字符串中查找另一个字符串、字符串连接、字符串比较等

注意使用时要放在一个文件夹内!!!!

import Java.io.*;

import java.util.*;

public class Student implements Comparable {

String name;

int stuID;

double sum;

String grade;

double course1, course2, course3;

TestStudent ts;

BufferedReader br = null;

DataOutputStream dos = null;

DataInputStream dis = null;

Student(TestStudent ts) {

this.ts = ts;

if (br == null)

br = new BufferedReader(new InputStreamReader(System.in));

if (dos == null)

try {

dos = new DataOutputStream(new FileOutputStream(

"f:/lv/b/Hello.txt"));

} catch (FileNotFoundException e) {

e.printStackTrace();

}

System.out.println("姓名: ");

try {

name = br.readLine();

dos.writeUTF("name:" + name);

0b1331709591d260c1c78e86d0c51c18.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值