All pastes #161178 Raw Edit

Mine

public text v1 · immutable
·published 2006-09-05 02:39 UTC
rendered paste body
//*****************************************************
// Application HappyBirthdayToYou reads in a name
// and prints a message saying Happy Birthday followed
// by the name.
//*****************************************************
import java.io.*;
public class HappyBirthdayToYou
{
        static class BirthdayName
        {
                String enteredName;
        }
        public void getName() throws IOException
        {
                BufferedReader inData;
                inData =
                        new BufferedReader(new InputStreamReader(System.in));
                System.out.println("Please enter your name: ");
                enteredName = inData.readLine();
        }
        public void printMessage()
        {
                System.out.println("Happy Birthday, " +  enteredName);
        }
public static void main(String[] args) throws IOException
{
        BirthdayName birthday;
        birthday = new BirthdayName();
        birthday.getName();
        birthday.printMessage();
}
}