edu.pdx.cs399J.lang
Class DivTwo

java.lang.Object
  extended by edu.pdx.cs399J.lang.DivTwo

public class DivTwo
extends Object

This class demonstrates throwing exceptions. It reads two doubles from the command line and divides the second by the first. If the second is zero, an IllegalArgumentException is thrown.


Constructor Summary
DivTwo()
           
 
Method Summary
static void main(String[] args)
          Reads two doubles from the command line and divides the first by the second.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DivTwo

public DivTwo()
Method Detail

main

public static void main(String[] args)
Reads two doubles from the command line and divides the first by the second.



Copyright © 2000-2009 Portland State University. All Rights Reserved.