Package edu.pdx.cs.joy.lang


package edu.pdx.cs.joy.lang

This package contains example Java programs that demonstrate fundamental aspects of the Java programming language such as declaring variables, handling exceptions, and class inheritance.

Some Java Language Resources:

Links about annotations and annotation processing

  • Class
    Description
    This program demonstrates exception handling by reading two integers from the command line and prints their sum.
    This class is the base class in our animal hierarchy.
    Deprecated.
    This class shouldn't be used anymore
    This class represents an ant.
    Demonstrates J2SE primitive data "autoboxing" features.
    This class represents a bee.
    This class represents all birds.
    This class demonstrates covariant returns in JDK 1.5.
    An animal that can be cloned.
     
     
    This class represents a cow.
    This class demonstrates throwing exceptions.
    This class demonstrate the instanceof operator and the concept of interfaces using the animal hierarchy.
    This class represents a duck.
    Demonstrates J2SE's "enhanced for loop" functionality.
    Demonstrates J2SE's "enumerated type" facility.
    This interface is implemented by all animals that can fly.
    This class demonstrates how generic collections can be used with legacy code that does not use generics.
    A "legacy" class that does not use generic collections.
    A grad student
    A student
    This class demonstrates how updated domain classes that use generics can interact with legacy code that doesn't use generics.
    An updated domain class that uses generics
    A grad student
    A student
    This class simply prints "Hello World".
    This class represents a human being (not a human doing).
    This class represents an insect.
    This class demonstrates Javadoc comments
    This class represents all mammals.
    Demonstrates adding behavior to enumerated types.
    This class demonstrates the Override annotation.
    This class contains one method that is overridden in a subclass.
    Demonstrates Java's pass by value mechanism
    This class demonstrates constructors, the toString method, and instance fields.
    This class has a main method that demonstrates the effects of inheritance and virtual method dispatches using the animal class hierarchy.
    This class represents a Sheep.
    Demonstrates J2SE's "static import" facility.
    Tuple<A,B>
    A tuple class that holds two generic values.
    Uses the generic Tuple class to return a host/port combination from a single method.
    This class represents a Turkey.
    This program uses Java's reflection mechanism to print the name of a given Object's class.