Package edu.pdx.cs410J.lang
package edu.pdx.cs410J.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:
- The Getting Started trail of Sun's Java Tutorial
- The exceptions trail of Sun's Java Tutorial
- The Java Language Specification (not the best way to learn the language)
Links about annotations and annotation processing
-
ClassDescriptionThis 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 anymoreThis class represents an ant.This class represents a bee.This class represents all birds.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.This interface is implemented by all animals that can fly.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 commentsThis class represents all mammals.Demonstrates Java's pass by value mechanismThis 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.This class represents a Turkey.This program uses Java's reflection mechanism to print the name of a givenObject
's class.