#acl All:
== 課題07 ==

Chainクラスを作成し、次のいずれかを行うmainメソッドを記述しなさい。

 {{{#!java
public class Chain
{
	Chain next;

	void show()
	{
		System.out.println(this);
	}

	void showAll()
	{
		Chain c;

		c = this;
		System.out.println("(");
		while(c != null)
		{
			c.show();
			c = c.next;
		}
		System.out.println(")");
	}
	
	public static void main(String[] args)
	{
		Chain a, b, c;
		...
	}
}
 }}}
----
==== 1. (初級) ====
mainメソッド内の変数a,b,cが図のようなオブジェクトを参照しているようにした後
 {{{
a.showAll();
b.showAll();
c.showAll();
 }}}
を行って動作を確かめなさい。
----
==== 2. (中級) ====
初級と同じ動作を、 next.next のような記述をしないで行いなさい。
----
==== 3. (上級) ====
初級で作成しているインスタンスを次の順で作成するようにしなさい。