📄 elem.java
字号:
package myList;
import java.io.*;
public class Elem
{
String title;
String author;
Elem next; // and reference to next element
boolean setA;
boolean setT;
Elem () // constructor
{
title = new String();
author = new String();
next = null;
setA = false;
setT = false;
}
public static Elem makeElem(BufferedReader In)
{
Elem h;
String i = new String();
String j = new String();
try
{
i = In.readLine();
j = In.readLine();
}
catch(IOException e)
{
/* if (e instanceof FileNotFoundException)
{
System.out.println("Input file not found: " + args[0]);
}
else System.out.println("read error!");
System.exit(-1);
*/
}
h = new Elem();
h.setTitle(i);
h.setAuthor(j);
return h;
}
public void setTitle(String t){title = t;}
public void setAuthor(String a){author = a;}
public void setNext(Elem n){next=n;}
public String getTitle(){return title;}
public String getAuthor(){return author;}
public Elem getNext(){return next;}
//public String toString(){return data + " ";}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -