You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MainClass.java 579B

1234567891011121314151617
  1. package moody;
  2. public class MainClass {
  3. public static void main(String[] args) {
  4. AnnotationMoodImplementor ami0 = new AnnotationMoodImplementor();
  5. AnnotationMoodImplementor ami1 = new AnnotationMoodImplementor();
  6. System.out.println("ami0's mood is " + ((AnnotationMoodIndicator.Moody) ami0).getMood());
  7. ((AnnotationMoodIndicator.Moody) ami1).setMood(Mood.JOLLY);
  8. System.out.println("ami1's mood is now " + ((AnnotationMoodIndicator.Moody) ami1).getMood());
  9. System.out.println("ami0's mood is still " + ((AnnotationMoodIndicator.Moody) ami0).getMood());
  10. }
  11. }