导航:首页 > 源码编译 > java电子书源码

java电子书源码

发布时间:2025-02-10 20:49:45

❶ 从网上下载的java 源码文件怎么运行

本人已完成配置并运行成功

配置如下:

1:你必须有sqlserver2000并用它的企业管理器把下载的数据库用附加的方式加载

2:在“开始”——“设置”——“控制面板”——“管理工具”中找到

数据源(ODBC)打开在系统DSN中点添加----选择sqlserver确定-----

名称写test服务器写(local)------更改默认数据库为BOOKSDB---测试连接---完成

3:我用的是Eclipse编辑器

新建一个JAVA项目之后把它BOOK下的把有东西都复制进去main函数在APPBOOK.java里,运行它就可以了,之后进软件的用户名为neeke密码也是

这样就完成了!!!!希望能够对你有所帮助

❷ java简单记事本源代码 带解释

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
class test implements ActionListener
{
JFrame frame;
JButton b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18,b19,b20,b21,b22,b23,b24,b25,b26,b27,b28,b29,b30,b31;
JTextArea ta;
JPanel p1,p2,p3,p4;
JMenuBar mb;
JMenu m1,m2,m3;
JMenuItem mt1,mt2,mt3,mt4,mt5,mt6,mt7;
JRadioButton rb1,rb2;
ButtonGroup bg;
Double d1=0.0,d2=0.0,d3=0.0,d4=1.0,d5=1.0;
String s1="",s2="",s3="",s4="";
int a=0;
char c1;
int i=0;
public static void main(String[] args)
{
test that=new test();
that.go();

}
public void go()
{

frame=new JFrame("计算器");
Container cp= frame.getContentPane();
cp.setLayout(new FlowLayout());

b1=new JButton("7");b2=new JButton("8");b3=new JButton("9");b4=new JButton("/");b5=new JButton("1/x");b6=new JButton("sin");b7=new JButton("log");
b8=new JButton("4");b9=new JButton("5");b10=new JButton("6");b11=new JButton("*");b12=new JButton("x^y");b13=new JButton("cos");b14=new JButton("ln");
b15=new JButton("1");b16=new JButton("2");b17=new JButton("3");b18=new JButton("-");b19=new JButton(new ImageIcon("lanying.gif"));b20=new JButton("tan");b21=new JButton("x^3");
b22=new JButton("0");b23=new JButton("+/-");b24=new JButton(".");b25=new JButton("+");b26=new JButton("√x");b27=new JButton("cot");b28=new JButton("x^2");
b29=new JButton("Backspace");b30=new JButton("C");b31=new JButton("=");

mb=new JMenuBar();

m1=new JMenu("文件(F)");m2=new JMenu("编辑(E)");m3=new JMenu("帮助(H)");

mt1=new JMenuItem("清零");mt2=new JMenuItem("退出");mt3=new JMenuItem("复制");mt4=new JMenuItem("粘贴");mt5=new JMenuItem("版本");mt6=new JMenuItem("标准型");mt7=new JMenuItem("科学型");

ta=new JTextArea(1,30);

p1=new JPanel();p2=new JPanel();p3=new JPanel();p4=new JPanel();

rb1=new JRadioButton("科学型");rb2=new JRadioButton("标准型");

bg=new ButtonGroup();

b1.setForeground(Color.blue);b1.setBackground(Color.white);b2.setForeground(Color.blue);b2.setBackground(Color.white);
b3.setForeground(Color.blue);b3.setBackground(Color.white);b8.setForeground(Color.blue);b8.setBackground(Color.white);
b9.setForeground(Color.blue);b9.setBackground(Color.white);b10.setForeground(Color.blue);b10.setBackground(Color.white);
b15.setForeground(Color.blue);b15.setBackground(Color.white);b16.setForeground(Color.blue);b16.setBackground(Color.white);
b17.setForeground(Color.blue);b17.setBackground(Color.white);b22.setForeground(Color.blue);b22.setBackground(Color.white);
b23.setForeground(Color.blue);b23.setBackground(Color.white);b24.setForeground(Color.blue);b24.setBackground(Color.white);

b4.setForeground(Color.red);b4.setBackground(Color.white);b11.setForeground(Color.red);b11.setBackground(Color.white);
b18.setForeground(Color.red);b18.setBackground(Color.white);b25.setForeground(Color.red);b25.setBackground(Color.white);

b5.setForeground(Color.blue);b5.setBackground(Color.white);b6.setForeground(Color.blue);b6.setBackground(Color.white);
b7.setForeground(Color.blue);b7.setBackground(Color.white);b12.setForeground(Color.blue);b12.setBackground(Color.white);
b13.setForeground(Color.blue);b13.setBackground(Color.white);b14.setForeground(Color.blue);b14.setBackground(Color.white);
b19.setForeground(Color.blue);b19.setBackground(Color.white);b20.setForeground(Color.blue);b20.setBackground(Color.white);
b21.setForeground(Color.blue);b21.setBackground(Color.white);b26.setForeground(Color.blue);b26.setBackground(Color.white);
b27.setForeground(Color.blue);b27.setBackground(Color.white);b28.setForeground(Color.blue);b28.setBackground(Color.white);

b29.setForeground(Color.red);b29.setBackground(Color.white);b30.setForeground(Color.red);b30.setBackground(Color.white);
b31.setForeground(Color.red);b31.setBackground(Color.white);

bg.add(rb1);bg.add(rb2);

p1.setBackground(Color.yellow);
cp.setBackground(Color.CYAN);

m1.setMnemonic(KeyEvent.VK_F);m2.setMnemonic(KeyEvent.VK_E);m3.setMnemonic(KeyEvent.VK_H);

m1.add(mt6);m1.add(mt7);m1.addSeparator();m1.add(mt1);m1.addSeparator();m1.add(mt2);m2.add(mt3);m2.addSeparator();m2.add(mt4);m3.add(mt5);
mb.add(m1);mb.add(m2);mb.add(m3);

frame.setJMenuBar(mb);

p2.setLayout(new GridLayout(4,7));
p3.setLayout(new GridLayout(1,3));

ta.setEditable(false);
p1.add(ta);

p2.add(b1);p2.add(b2);p2.add(b3);p2.add(b4);p2.add(b5);p2.add(b6);p2.add(b7);
p2.add(b8);p2.add(b9);p2.add(b10);p2.add(b11);p2.add(b12);p2.add(b13);p2.add(b14);
p2.add(b15);p2.add(b16);p2.add(b17);p2.add(b18);p2.add(b19);p2.add(b20);p2.add(b21);
p2.add(b22);p2.add(b23);p2.add(b24);p2.add(b25);p2.add(b26);p2.add(b27);p2.add(b28);

p3.add(b29);p3.add(b30);p3.add(b31);

Border etched=BorderFactory.createEtchedBorder();
Border border=BorderFactory.createTitledBorder(etched,"计算类型");

p4.add(rb1);p4.add(rb2);
p4.setBorder(border);

b2.setActionCommand("8");
b2.addActionListener(this);

cp.add(p1);cp.add(p4);cp.add(p2);cp.add(p3);

frame.setSize(400,330);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

b1.setActionCommand("7");
b1.addActionListener(this);
b2.setActionCommand("8");
b2.addActionListener(this);
b3.setActionCommand("9");
b3.addActionListener(this);
b4.setActionCommand("/");
b4.addActionListener(this);
b5.setActionCommand("1/x");
b5.addActionListener(this);
b6.setActionCommand("sin");
b6.addActionListener(this);
b7.setActionCommand("log");
b7.addActionListener(this);
b8.setActionCommand("4");
b8.addActionListener(this);
b9.setActionCommand("5");
b9.addActionListener(this);
b10.setActionCommand("6");
b10.addActionListener(this);
b11.setActionCommand("*");
b11.addActionListener(this);
b12.setActionCommand("x^y");
b12.addActionListener(this);
b13.setActionCommand("cos");
b13.addActionListener(this);
b14.setActionCommand("ln");
b14.addActionListener(this);
b15.setActionCommand("1");
b15.addActionListener(this);
b16.setActionCommand("2");
b16.addActionListener(this);
b17.setActionCommand("3");
b17.addActionListener(this);
b18.setActionCommand("-");
b18.addActionListener(this);
b19.setActionCommand("x!");
b19.addActionListener(this);
b20.setActionCommand("tan");
b20.addActionListener(this);
b21.setActionCommand("x^3");
b21.addActionListener(this);
b22.setActionCommand("0");
b22.addActionListener(this);
b23.setActionCommand("+/-");
b23.addActionListener(this);
b24.setActionCommand(".");
b24.addActionListener(this);
b25.setActionCommand("+");
b25.addActionListener(this);
b26.setActionCommand("√x");
b26.addActionListener(this);
b27.setActionCommand("cot");
b27.addActionListener(this);
b28.setActionCommand("x^2");
b28.addActionListener(this);
b29.setActionCommand("Backspace");
b29.addActionListener(this);
b30.setActionCommand("C");
b30.addActionListener(this);
b31.setActionCommand("=");
b31.addActionListener(this);
rb1.setActionCommand("kxx");
rb1.addActionListener(this);
rb2.setActionCommand("bzx");
rb2.addActionListener(this);

}
public void actionPerformed(ActionEvent e) //throws Exception
{

if (e.getActionCommand()=="bzx")
{
b5.setEnabled(false);b6.setEnabled(false);b7.setEnabled(false);
b12.setEnabled(false);b13.setEnabled(false);b14.setEnabled(false);
b19.setEnabled(false);b20.setEnabled(false);b21.setEnabled(false);
b26.setEnabled(false);b27.setEnabled(false);b28.setEnabled(false);

}
if (e.getActionCommand()=="kxx")
{
b5.setEnabled(true);b6.setEnabled(true);b7.setEnabled(true);
b12.setEnabled(true);b13.setEnabled(true);b14.setEnabled(true);
b19.setEnabled(true);b20.setEnabled(true);b21.setEnabled(true);
b26.setEnabled(true);b27.setEnabled(true);b28.setEnabled(true);
}
if (e.getActionCommand()=="1")
{
ta.append("1");
}
if (e.getActionCommand()=="2")
{
ta.append("2");
}
if (e.getActionCommand()=="3")
{
ta.append("3");
}
if (e.getActionCommand()=="4")
{
ta.append("4");
}
if (e.getActionCommand()=="5")
{
ta.append("5");
}
if (e.getActionCommand()=="6")
{
ta.append("6");
}
if (e.getActionCommand()=="7")
{
ta.append("7");
}
if (e.getActionCommand()=="8")
{
ta.append("8");
}
if (e.getActionCommand()=="9")
{
ta.append("9");
}
if (e.getActionCommand()=="0")
{
ta.append("0");
}
if (e.getActionCommand()=="+")
{
s1=ta.getText();
d1 = Double.parseDouble(s1);
ta.setText("");
i=1;
}
if (e.getActionCommand()=="-")
{
s1=ta.getText();
d1 = Double.parseDouble(s1);
ta.setText("");
i=2;
}
if (e.getActionCommand()=="*")
{
s1=ta.getText();
d1 = Double.parseDouble(s1);
ta.setText("");
i=3;
}
if (e.getActionCommand()=="/")
{
s1=ta.getText();
d1 = Double.parseDouble(s1);
ta.setText("");
i=4;
}
if (e.getActionCommand()=="=")
{
s2=ta.getText();
d2=Double.parseDouble(s2);
if(i==1)
{
d3=d1+d2;
ta.setText( d3.toString());
}
if(i==2)
{
d3=d1-d2;
ta.setText( d3.toString());
}
if(i==3)
{
d3=d1*d2;
ta.setText( d3.toString());
}
if(i==4)
{
if(d2==0.0)
ta.setText("ERROR");
else
{
d3=d1/d2;
ta.setText( d3.toString());
}
}
if (i==5)
{
s2=ta.getText();
d2 = Double.parseDouble(s2);
for (int l=1;l<=d2 ; l++)
{
d5=d5*d1;
}
ta.setText( d5.toString());
}

}
if (e.getActionCommand()=="C")
{
ta.setText("");
d4=1.0;
d5=1.0;
}
/*if (e.getActionCommand()=="Backspace")
{
s3=ta.getText();
a=s3.length();
//ta.cut(ta.select(a-1,a));
s4=ta.getText(1,3);
ta.setText(s4);

}
*/
if (e.getActionCommand()=="1/x")
{
s1=ta.getText();
d1 = Double.parseDouble(s1);
d2=1/d1;
ta.setText( d2.toString());

}
if (e.getActionCommand()==".")
{
ta.append(".");
}
if (e.getActionCommand()=="+/-")
{
s1=ta.getText();
d1 = Double.parseDouble(s1);
d2=0-d1;
ta.setText( d2.toString());
}
if (e.getActionCommand()=="x^2")
{
s1=ta.getText();
d1 = Double.parseDouble(s1);
d2=d1*d1;
ta.setText( d2.toString());
}
if (e.getActionCommand()=="x^3")
{
s1=ta.getText();
d1 = Double.parseDouble(s1);
d2=d1*d1*d1;
ta.setText( d2.toString());
}
if (e.getActionCommand()=="x^y")
{
s1=ta.getText();
d1 = Double.parseDouble(s1);
ta.setText("");
i=5;
// d2=d1*d1*d1;
// ta.setText( d2.toString());
}
if (e.getActionCommand()=="√x")
{
s1=ta.getText();
d1 = Double.parseDouble(s1);
d2=Math.sqrt(d1);
ta.setText( d2.toString());
}

if (e.getActionCommand()=="x!")
{
s1=ta.getText();
d1 = Double.parseDouble(s1);
if (d1<0)
{
ta.setText( "error");
}
else if (d1==0)
{
ta.setText( "0.0");
}
else {
for (int k=1;k<=d1 ;k++ )
d4=d4*k;
ta.setText( d4.toString());
}
}
if (e.getActionCommand()=="sin")
{
s1=ta.getText();
d1 = Double.parseDouble(s1);
d2=Math.sin(3.1415926*d1/180);

ta.setText( d2.toString());
}

}

}

❸ 求一个用JAVA写的简单的记事本源代码程序

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.awt.datatransfer.*;

class MyMenuBar extends MenuBar{
public MyMenuBar(Frame parent){
parent.setMenuBar(this);
}
public void addMenus(String [] menus){
for(int i=0;i<menus.length;i++)
add(new Menu(menus[i]));
}
public void addMenuItems(int menuNumber,String[] items){
for(int i=0;i<items.length;i++){
if(items[i]!=null)
getMenu(menuNumber).add(new MenuItem(items[i]));
else getMenu(menuNumber).addSeparator();
}
}
public void addActionListener(ActionListener al){
for(int i=0;i<getMenuCount();i++)
for(int j=0;j<getMenu(i).getItemCount();j++)
getMenu(i).getItem(j).addActionListener(al);
}
}

class MyFile{
private FileDialog fDlg;
public MyFile(Frame parent){
fDlg=new FileDialog(parent,"",FileDialog.LOAD);
}
private String getPath(){
return fDlg.getDirectory()+"\\"+fDlg.getFile();
}
public String getData() throws IOException{
fDlg.setTitle("打开");
fDlg.setMode(FileDialog.LOAD);
fDlg.setVisible(true);
BufferedReader br=new BufferedReader(new FileReader(getPath()));
StringBuffer sb=new StringBuffer();
String aline;
while((aline=br.readLine())!=null)
sb.append(aline+'\n');
br.close();
return sb.toString();
}
public void setData(String data) throws IOException{
fDlg.setTitle("保存");
fDlg.setMode(FileDialog.SAVE);
fDlg.setVisible(true);
BufferedWriter bw=new BufferedWriter(new FileWriter(getPath()));
bw.write(data);
bw.close();
}
}

class MyClipboard{
private Clipboard cb;
public MyClipboard(){
cb=Toolkit.getDefaultToolkit().getSystemClipboard();
}
public void setData(String data){
cb.setContents(new StringSelection(data),null);
}
public String getData(){
Transferable content=cb.getContents(null);
try{
return (String) content.getTransferData(DataFlavor.stringFlavor);
//DataFlavor.stringFlavor会将剪贴板中的字符串转换成Unicode码形式的String对象。
//DataFlavor类是与存储在剪贴板上的数据的形式有关的类。
}catch(Exception ue){}
return null;
}
}

class MyFindDialog extends Dialog implements ActionListener{
private Label lFind=new Label("查找字符串");
private Label lReplace=new Label("替换字符串");
private TextField tFind=new TextField(10);
private TextField tReplace=new TextField(10);
private Button bFind=new Button("查找");
private Button bReplace=new Button("替换");
private TextArea ta;
public MyFindDialog(Frame owner,TextArea ta){
super(owner,"查找",false);
this.ta=ta;
setLayout(null);
lFind.setBounds(10,30,80,20);
lReplace.setBounds(10,70,80,20);
tFind.setBounds(90,30,90,20);
tReplace.setBounds(90,70,90,20);
bFind.setBounds(190,30,80,20);
bReplace.setBounds(190,70,80,20);
add(lFind);
add(tFind);
add(bFind);
add(lReplace);
add(tReplace);
add(bReplace);
setResizable(false);
bFind.addActionListener(this);
bReplace.addActionListener(this);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
MyFindDialog.this.dispose();
}
});
}//构造函数结束
public void showFind(){
setTitle("查找");
setSize(280,60);
setVisible(true);
}
public void showReplace(){
setTitle("查找替换");
setSize(280,110);
setVisible(true);
}
private void find(){
String text=ta.getText();
String str=tFind.getText();
int end=text.length();
int len=str.length();
int start=ta.getSelectionEnd();
if(start==end) start=0;
for(;start<=end-len;start++){
if(text.substring(start,start+len).equals(str)){
ta.setSelectionStart(start);
ta.setSelectionEnd(start+len);
return;
}
}
//若找不到待查字符串,则将光标置于末尾
ta.setSelectionStart(end);
ta.setSelectionEnd(end);
}

public Button getBFind() {
return bFind;
}
private void replace(){
String str=tReplace.getText();
if(ta.getSelectedText().equals(tFind.getText()))
ta.replaceRange(str,ta.getSelectionStart(),ta.getSelectionEnd());
else find();
}

public void actionPerformed(ActionEvent e) {
if(e.getSource()==bFind)
find();
else if(e.getSource()==bReplace)
replace();
}
}

public class MyMemo extends Frame implements ActionListener{
private TextArea editor=new TextArea(); //可编辑的TextArea
private MyFile mf=new MyFile(this);//MyFile对象
private MyClipboard cb=new MyClipboard();
private MyFindDialog findDlg=new MyFindDialog(this,editor);

public MyMemo(String title){ //构造函数
super(title);
MyMenuBar mb=new MyMenuBar(this);
//添加需要的菜单及菜单项
mb.addMenus(new String[]{"文件","编辑","查找","帮助"});
mb.addMenuItems(0,new String[]{"新建","打开","保存",null,"全选"});
mb.addMenuItems(1,new String[]{"剪贴","复制","粘贴","清除",null,"全选"});
mb.addMenuItems(2,new String[]{"查找",null,"查找替换"});
mb.addMenuItems(3,new String[]{"我的记事本信息"});

add(editor); //为菜单项注册动作时间监听器
mb.addActionListener(this);

addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
MyMemo.this.dispose();
}
}); //分号不能忘了
} //构造函数完

public void actionPerformed(ActionEvent e){
String selected=e.getActionCommand(); //获取菜单项标题
if(selected.equals("新建"))
editor.setText("");
else if(selected.equals("打开")){
try{
editor.setText(mf.getData());
}catch(IOException ie){}
}
else if(selected.equals("保存")){
try{
mf.setData(editor.getText());
}catch(IOException ie){}
}
else if(selected.equals("退出")){
dispose();
}
else if(selected.equals("剪贴")){
//将选中的字符串复制到剪贴板中并清除字符串
cb.setData(editor.getSelectedText());
editor.replaceRange("",editor.getSelectionStart(),editor.getSelectionEnd());
}
else if(selected.equals("复制")){
cb.setData(editor.getSelectedText());
}
else if(selected.equals("粘贴")){
String str=cb.getData();
editor.replaceRange(str,editor.getSelectionStart(),editor.getSelectionEnd());
//粘贴在光标位置
}
else if(selected.equals("清除")){
editor.replaceRange("",editor.getSelectionStart(),editor.getSelectionEnd());
}
else if(selected.equals("全选")){
editor.setSelectionStart(0);
editor.setSelectionEnd(editor.getText().length());
}
else if(selected.equals("查找")){
findDlg.showFind();
}
else if(selected.equals("查找替换")){
findDlg.showReplace();
}
}

public static void main(String[] args){
MyMemo memo=new MyMemo("记事本");
memo.setSize(650,450);
memo.setVisible(true);
}
}

❹ 高分求两个简单的JAVA设计源代码

上面 wukun12同学写的不错,但我想还不能运行,并且还不太完善。我给个能运行的:(注意:文件名为:Test.java)

//要实现对象间的比较,就必须实现Comparable接口,它里面有个compareTo方法
//Comparable最好使用泛型,这样,无论是速度还是代码量都会减少
@SuppressWarnings("unchecked")
class Student implements Comparable<Student>{

private String studentNo; //学号
private String studentName; //姓名
private double englishScore; //英语成绩
private double computerScore; //计算机成绩
private double mathScore; //数学成绩
private double totalScore; //总成绩

//空构造函数
public Student() {}

//构造函数
public Student(String studentNo,String studentName,double englishSocre,double computerScore,double mathScore) {
this.studentNo = studentNo;
this.studentName = studentName;
this.englishScore = englishSocre;
this.computerScore = computerScore;
this.mathScore = mathScore;
}

//计算总成绩
public double sum() {

this.totalScore = englishScore+computerScore+mathScore;
return totalScore;
}

//计算评测成绩
public double testScore() {

return sum()/3;
}

//实现compareTO方法
@Override
public int compareTo(Student student) {
double studentTotal = student.getTotalScore();
return totalScore==studentTotal?0:(totalScore>studentTotal?1:-1);
}

//重写toString方法
public String toString(){
return "学号:"+this.getStudentNo()+" 姓名:"+this.getStudentName()+" 英语成绩:"+this.getEnglishScore()+" 数学成绩:"+this.getMathScore()+" 计算机成绩:"+this.getComputerScore()+" 总成绩:"+this.getTotalScore();
}

//重写equals方法
public boolean equals(Object obj) {
if(obj == null){
return false;
}
if(!(obj instanceof Student)){
return false;
}
Student student = (Student)obj;
if(this.studentNo.equals(student.getStudentName())) { //照现实来说,比较是不是同一个学生,应该只是看他的学号是不是相同
return true;
} else {
return false;
}

}

/*以下为get和set方法,我个人认为,totalScore的set的方法没必要要,因为它是由其它成绩计算出来的
在set方法中,没设置一次值,调用一次sum方法,即重新计算总成绩
*/
public String getStudentNo() {
return studentNo;
}
public void setStudentNo(String studentNo) {
this.studentNo = studentNo;
sum();
}
public String getStudentName() {
return studentName;
}
public void setStudentName(String studentName) {
this.studentName = studentName;
sum();
}
public double getEnglishScore() {
return englishScore;
}
public void setEnglishScore(double englishScore) {
this.englishScore = englishScore;
sum();
}
public double getComputerScore() {
return computerScore;
}
public void setComputerScore(double computerScore) {
this.computerScore = computerScore;
sum();
}
public double getMathScore() {
return mathScore;
}
public void setMathScore(double mathScore) {
this.mathScore = mathScore;
sum();
}
public double getTotalScore() {
return totalScore;
}

}

//Student子类学习委员类的实现
class StudentXW extends Student {

//重写父类Student的testScore()方法
@Override
public double testScore() {
return sum()/3+3;
}

public StudentXW() {}

//StudentXW的构造函数
public StudentXW(String studentNo,String studentName,double englishSocre,double computerScore,double mathScore) {
super(studentNo,studentName,englishSocre,computerScore,mathScore);
}
}

//Student子类班长类的实现
class StudentBZ extends Student {

//重写父类Student的testScore()方法
@Override
public double testScore() {
return sum()/3+5;
}

public StudentBZ() {}

//StudentXW的构造函数
public StudentBZ(String studentNo,String studentName,double englishSocre,double computerScore,double mathScore) {
super(studentNo,studentName,englishSocre,computerScore,mathScore);
}
}

//测试类
public class Test {

public static void main(String[] args) {

//生成若干个student类、StudentXW类、StudentBZ类
Student student1 = new Student("s001","张三",70.5,50,88.5);
Student student2 = new Student("s002","李四",88,65,88.5);
Student student3 = new Student("s003","王五",67,77,90);
StudentXW student4 = new StudentXW("s004","李六",99,88,99.5);
StudentBZ student5 = new StudentBZ("s005","朱漆",56,65.6,43.5);

Student[] students = {student1,student2,student3,student4,student5};

for(int i = 0 ; i<students.length; i++){
double avgScore = students[i].testScore();
System.out.println(students[i].getStudentName()+"学生的评测成绩为:"+ avgScore+"分");
}

}
}
运行结果为:
张三学生的评测成绩为:69.66666666666667分
李四学生的评测成绩为:80.5分
王五学生的评测成绩为:78.0分
李六学生的评测成绩为:98.5分
朱漆学生的评测成绩为:60.03333333333333分

❺ Java开发书籍推荐(200多本)

整理了一份关于Java开发的电子书资源,共约200本PDF版本,分享给需要的朋友们。


全部免费获取,无需添加QQ,无需关注公众号,直接使用网络网盘链接下载。


请在下载后给予我一个赞,顺便分享给还在寻找资源的兄弟们。


以下目录展示了部分书单内容,以供参考:


Java


- 21天学通Java


- Effective Java中文版(第2版)


- Head First Java 中文高清版


- EXPERT.ONE.ON.ONE.J2EE.DEVELOPMENT.WITHOUT.EJB-中文


- Java 程序员进阶之路(亮白版)


- Hibernate实战(第2版)


- Java 8 实战


- Java8函数式编程


- Java8中的炫酷特性和Java9中的新特性-杨晓峰


- JavaNIO(中文版)


- JAVA优化编程


- Java加密与解密的艺术 梁栋


- Java基础与案例开发详解


- Java学习路线图:Java必须知道的300个问题


- Java并发编程的艺术


- JVM


- Java虚拟机基础教程 高清中文版PDF


- Java虚拟机并发编程


- Java虚拟机规范(Java SE 8版)(带书签完整版)


- 实战JAVA虚拟机 JVM故障诊断与性能优化


- 揭秘Java虚拟机-JVM设计原理与实现


- 深入理解Java虚拟机JVM高级特性与最佳实践第3版(周志朋)


- 解析Java虚拟机器开发:权衡优化、高效和安全的最优方案


Kubernetes


- Kubernetes实战 ,吴龙辉 ,P272


- Kubernetes开源书


- Kubernetes指南(Kubernetes Handbook)


- Kubernetes权威指南第2版


- Kubernetes经典实例


- 【阿里云】深入浅出Kubernetes项目实战手册


- 基于Kubernetes的容器云平台实战


linux


- linux常用命令大全


- Linux宝典


- Linux环境编程:从应用到内核


- LINUX防火墙(原书第3版)


- Linux高级程序设计中文第三版杨宗德--人电出版社


- [Linux命令详解词典].施威铭研究室.扫描版


- 深入Linux内核架构 (图灵程序设计丛书·LinuxUNIX系列)


- 鸟哥的LINUX私房菜_基础学习篇(第三版)


- 鸟哥的LINUX私房菜:服务器架设篇 (第二版)


MyBatis


- MyBatis从入门到精通


- Spring+MVC+MyBatis企业应用实战


- MyBatis技术内幕


- 深入浅出MyBatis技术原理与实战


- Spring+MyBatis企业应用实战


Netty


- Netty实战中文高清版


- Netty权威指南 第2版 带书签目录 完整版


- Netty进阶之路 跟着案例学Netty_完整版


Redis


- Redis入门指南 第2版


- Redis实战


- Redis开发与运维-付磊


- Redis深度历险:核心原理和应用实践


- redis设计与实现


- 深入理解Redis


Spring


- Spring Security实战 - 陈木鑫


- Spring.2.0核心技术与最佳实践.廖雪峰.扫描版


- Spring从入门到精通


- Spring5高级编程


- Spring实战(第4版文字版)


- Spring揭秘


- Spring源码深度解析


- spring高级程序设计


Spring Boot


- Spring Boot 2+Thymeleaf企业应用实战


- Spring技术内幕:深入解析Spring架构与设计原理


- 精通spring - Mastering Spring


- Spring Boot 2精髓(高清版)


- Spring Boot企业级应用开发实战


- Spring Boot+Vue全栈开发实战


- Spring Boot开发实战


- SpringBoot揭秘+快速构建微服务体系


- 微服务实战:Dubbox+Spring Boot+Docker


- 一步一步学Spring Boot 2微服务项目实战


- 微服务架构实战 基于Spring Boot Spring Cloud Docker


- 微服务架构基础(Spring Boot+Spring Cloud+Docker)


- 深入实践Spring Boot.陈韶健


Spring Cloud


- Spring Cloud 微服务架构进阶


- Spring Cloud与Docker高并发微服务架构设计实施


- Spring Cloud与Docker微服务架构实战


- Spring Cloud微服务全栈技术与案例解析


- Spring Cloud微服务实战


- Spring Cloud微服务架构开发实战


- 疯狂Spring Cloud微服务架构实战


- 重新定义Spring Cloud实战


Zookeeper


- Zookeeper 分布式过程


- 从Paxos到Zookeeper 分布式一致性原理与实践


其他


- tomcat内核设计剖析


- 大数据之路:阿里巴巴大数据实践


- Hadoop大数据分析与挖掘实战


- Git入门与实践完整版


- Hadoop权威指南(第2版)


- 构建工具


- Maven实战


- 架构


- App后台开发运维和架构实践


- 亿级流量网站架构核心技术


- 数据结构和算法


- Docker全攻略


- Elasticsearch大数据搜索引擎


- Git版本控制管理第2版(美)罗力格


- Hadoop技术内幕 深入解析HADOOP COMMON和HDFS架构设计与实现原理


- Hadoop技术内幕+深入理解MapRece架构设计与实现原理


- Hadoop技术内幕深入解析YARN架构设计与实现原理


- 大话数据结构


- 算法导论


- Git权威指南-目录完美-完整版


- 大话设计模式


- 设计模式


- 大厂笔试真题+答案


- 人件(高清中英文合并版)


- 代码整洁之道


- 多处理器编程的艺术


- 程序开发心理学(银年纪念版)


- 计算机程序设计艺术(第一卷)高清中文版


- 编程之美-完整版


- 计算机程序设计艺术(第三卷)高清中文版


- 计算机程序设计艺术(第二卷)高清中文版

❻ java的源代码怎么查找如何下载


工具如何查找源代码

1、首先打开电脑的ie浏览器进去,如下图所示。进入ie浏览器首页后,点击查看,如下图所示。在查看菜单下选择源,如下图所示。最后打开源就看到本网页的源代码了,在最下方,如下图所示。

2、第二种方法就是根据浏览器状态栏或工具栏中的点击“查看”然后就用一项“查看源代码”,点击查看源代码即可查看此网页的源代码源文件。

3、首先打开谷歌浏览器(GoogleChrome),任意打开一个网页(例如网络),在浏览器右上角的菜单中找到更多工具开发者工具并打开(也可以直接按F12打开)。

4、要查看基于SpringBoot的Java项目的代码,您需要进行以下步骤:查看项目结构:您可以在部署项目的位置找到项目文件夹。打开项目文件夹并查看项目结构。

5、可以设置路径映射和搜索路径,帮助工具查找实验中引用的文件。

怎么通过快捷方式找到原文件?

1、具体操作方法是:打开Word软件,选择“文件”-“信息”-“管理文档”-“恢复未保存的文档”。

2、通过快捷方式找到源文件。将光标选中快捷方式。点击右键弹出菜单栏。点击最下方的属性。点击左下方【打开文件所在位置】选项。找到该文件的源文件。

3、在那个快捷方式那里,右键,属性,然后选择下面那里的“打开文件位置”,然后把那个“原文件”拖到桌面就可以了。

4、文件变成快捷方式怎么恢复?在桌面或文件夹中找到有问题的快捷方式,右键单击并选择“删除”,然后重新创建一个新的快捷方式。

绝对路径不管源文件在什么位置都可以非常精确地找到

1、绝对路径是指目录下的绝对位置,直接到达目标位置,通常是从盘符开始的路径。完整的描述文件位置的路径就是绝对路径,以web站点根目录为参考基础的目录路径。

2、我们可以根据该路径明确地找到所对应的文件(夹)。

3、绝对路径:一般是指文件在所在盘符的位置,而且是从盘符开始算起,如某文件位于“C:ProgramFilesJiangMin”下面,那么这个路径就是它的绝对路径。

4、绝对路径是指目录下的绝对位置,直接到达目标位置。物理路径指的是某一台计算机本地的路径,以盘符开头,例如C:、D: emp等等。

5、绝对路径:就是文件在本地硬盘上的真正路径即URL和物理路径。相对路径:相对与某个基准目录的路径(一般针对web目录而言,包含Web的相对路径)。

计算机中路径相关的查找器是什么?

路径查找器协议就是为了支持模块和已初始化包的导入,也为了给命名空间包提供组成部分,路径条目查找器必须实现find_spec()方法。find_spec()接受两个参数,即要导入模块的完整限定名称,以及(可选的)目标模块。

第一个查找器就是简单的在package.preload表中查找加载器。第二个查找器用于查找Lua库的加载库。它使用储存在package.path中的路径来做查找工作。查找过程和函数package.searchpath描述的一致。

ai路径查找器是一款关于查找ai路径的选择器,ai路径查找器分割不了图片是查找器的分割方式没选对。查找器(finger)是告诉你姓名及其电子邮件地址的程序。

元路径就是程序开发中最小的单元。当指定名称的模块在sys.moles中找不到时,Python会接着搜索sys.meta_path,其中包含元路径查找器对象列表。这些查找器按顺序被查询以确定它们是否知道如何处理该名称的模块。

怎么在相册里选中一张片后获得它的绝对路径

1、首先确定源文件在什么位置,如果图片的文件名和源文件在同一级,可以直接引用。

2、首先,打开手机桌面,点击打开相册,然后进入下一步。其次,进入图库后,以“相册”文件夹为例,在显示的相册中找到需要查找的照片,如下图所示,然后进入下一步。

3、你好,保存手机里的照片应该到图片图找就可以找到。

4、编辑”(或长按要移动的照片)--选择“剪切”--返回到要移入的文件夹中--点击“粘贴”】;整个文件夹移动:操作方法:【文件管理--长按要移动的相册--剪切--返回到要移入的文件夹中--点击右下角的“粘贴”】。

西马移动硬盘中文件的源位置在哪里查找

验,建议大家用下列方法试一下:方法一:移动硬盘盘符X--右键属性--工具--查错--开始检查,在“自动修复文件系统错误”前打钩,然后点击“开始”,检查完毕后,打开移动硬盘即可显示其中的所有文件。

双击原来系统盘所在分区。进入之后,双击“用户”文件夹。进入文件夹之后,接着双击“Administrator”文件夹。进入之后找到“桌面”文件夹并点击打开。进入之后就可以看到存放在桌面的文件了。

移动硬盘里的文件总是提示不在目录里解决办法:打开我的计算机,在需要修复的磁盘上单击右键,选择属性。在弹出的属性窗口中点击工具选项卡,在查错里面点击开始检查。

点击“RecovertoLocalDrive”后面的“Browse”按钮,在弹出的窗口中选择好目标目录即可。

阅读全文

与java电子书源码相关的资料

热点内容
美国好的源码出售 浏览:323
苹果ipad文件夹怎么添加文字 浏览:481
腾讯云连接自己的服务器地址 浏览:216
硕士英语综合教程pdf 浏览:46
分段加密的安全性 浏览:507
咪咕直播为什么没有适配安卓系统 浏览:172
php模版大全 浏览:102
没车能解压吗 浏览:634
php开发oa系统源码 浏览:759
怎么安装苹果ios的app 浏览:581
app拉新如何机刷 浏览:480
zendeclipseforphp 浏览:480
同时有几个微信如何加密微信 浏览:86
大众20t压缩比 浏览:566
程序员要记住的500个单词 浏览:830
wq快捷方式在哪个文件夹 浏览:965
云南到河北源码 浏览:92
安卓手机怎么玩造梦3 浏览:60
多玩我的世界盒子怎么创造服务器地址 浏览:986
手机如何下载米家app 浏览:96