⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 elem.java

📁 labs to practise link list and double link list
💻 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 + -