edu.pdx.cs399J.lang
Class DoIFly
java.lang.Object
edu.pdx.cs399J.lang.DoIFly
public class DoIFly
- extends Object
This class demonstrate the instanceof operator and the
concept of interfaces using the animal hierarchy. It uses the
instanceof operator to determine whether or not an
animal implements the Flies interface.
|
Method Summary |
static void |
main(String[] args)
This main program creates several animals and then prints out
whether or not they can fly. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DoIFly
public DoIFly()
main
public static void main(String[] args)
- This main program creates several animals and then prints out
whether or not they can fly.
Copyright © 2000-2009 Portland State University. All Rights Reserved.