導航:首頁 > 源碼編譯 > 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電子書源碼相關的資料

熱點內容
分段加密的安全性 瀏覽: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
未知來源app在哪裡 瀏覽:206
命令與征服3合集 瀏覽:752
有免稅標簽有溯源碼是假的嗎 瀏覽:218
stc89c52單片機引腳圖 瀏覽:223