go to previous page   go to home page   go to next page

Answer:

Garbage is collected by the garbage collector, part of the system that supports Java programs as they run. The garbage collector runs automatically when needed. In a short program like this it is probably not needed.


The Birthday class

birthday cards






Here is a skeleton for the Birthday class:



class Birthday extends  
{
  private int age;

  public   ( String r, int years )
  {
    recipient = r;
    age = years;
  }

  public void greeting()
  {
    System.out.println("Dear " + recipient + ",");
    
    System.out.println("Happy " +   + "th Birthday\n");
  }
}

QUESTION 10:

Fill in the missing parts.


go to previous page   go to home page   go to next page