drive - System.out.println(jeff.toString());

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/** drive class *<driver to test * Month class> *@author Jeff Cox */ * public class drive { public static void main(String[] args) { Month jeff; Month other; int test; jeff = new Month(5); other = new Month(10); System.out.println(jeff.getMonthName()); jeff.setMonthNumber(10);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.println(jeff.toString()); System.out.println(other.toString()); if(jeff.equals(other)) System.out.println(&quot;They are equal&quot;); else System.out.println(&quot;They are not equal&quot;); System.out.println(Month.countIt()); } }...
View Full Document

Ask a homework question - tutors are online