/*from class on 7-3-01
  demos a recursive call to print message
*/

public class Print_msg
{
    public Print_msg()
    { }

    public void Print_Forward( int count )
    {
	if ( count > 0 )
	    Print_Forward( count -1 );

	System.out.println("This is line " + count + " of the message");
    }

    public void Print_Backward( int count )
    {

	System.out.println("This is line" + count + " of the message");
	if ( count > 0 )
	    Print_Backward( count -1 );
    }


    public static void main( String []args )
    {

	Print_msg pm = new Print_msg();
	pm.Print_Forward( 5 );
	//this will print the message from last to first

	pm.Print_Backward( 5 );
	//this will print the message from first to last
    }

}

