Solution

//Purpose: To write a greetings inside of a web-page.
//         


import java.awt.Graphics;  //Graphics Classes
import java.applet.Applet; //Applet Class
import java.awt.Color; //Color Class


public class test2 extends Applet {
   public Color color = new Color(0,255,255);
   public int Index=0;

   public String Message [] = {"Hello", "How Ya Do'in", "G'Day", "Hasta La Vista",
                               "Adio", "Good Night"};

   public void paint(Graphics g) {
     g.setColor( color );
     g.drawString(Message[Index],25,25);
     Index++;
     if (Index >5)  Index = 0;
   }

}