import java.applet.Applet;
public class HelloWorldApplet extends Applet
{
	String myOutput;
	// This is a comment
	public void init()
	{
		myOutput = "Hello World!";
		doOutputMessage();
	}
	/*
	 * This is also a comment.
	 */
	public void doOutputMessage()
	{
		System.out.println(myOutput);
	}
}


import java.applet.Applet;
public class scopeTest extends Applet
{
	String myString = "Hello";
	public void init()
	{
		doPrintSomething();
		doPrintSomethingElse();
	}
	public void doPrintSomething()
	{
		String notPrinted;
		notPrinted = "Hi!";
		String localString = "World!";
		System.out.println(myString + " " + localString);
	}
	public void doPrintSomethingElse()
	{
		String localString = "Everybody!";
		System.out.println(myString + " " + localString);
	}
}



import java.applet.Applet;
public class scopeTest2 extends Applet
{
	String someVar1 = "the applet says: ";
	public void doSomethingManyTimes()
	{
		String someVar2 = "Hello!";
		for(int ctr = 0; ctr < 5; ctr++)
		{
			System.out.println(someVar1 + someVar2);
		}
	}
	public void doSomethingOnce()
	{
		String someVar3;
		someVar3 = someVar1 + "Heya!";
		System.out.println(someVar3);
	}
}





