home *** CD-ROM | disk | FTP | other *** search
/ Learn Java Now / Learn_Java_Now_Microsoft_1996.iso / JavaNow / Code / Chap09 / MyClass / MyClass.class (.txt) < prev    next >
Encoding:
Java Class File  |  1996-09-03  |  1.3 KB  |  20 lines

  1. import srd.math.ComplexNumber;
  2.  
  3. public class MyClass {
  4.    public static void main(String[] s) {
  5.       try {
  6.          ComplexNumber c = new ComplexNumber((double)4.0F, (double)2.0F);
  7.          System.out.println(c.toString() + " / 2 = " + c.Divide((double)2.0F).toString());
  8.          System.out.println(c.toString() + " / 0 = " + c.Divide((double)0.0F).toString());
  9.          System.out.println(c.toString() + " / 4 = " + c.Divide((double)4.0F).toString());
  10.       } catch (Exception var3) {
  11.          System.out.println("Output from e.toString():");
  12.          System.out.println(((Throwable)var3).toString());
  13.          System.out.println("\n");
  14.          System.out.println("Output from e.printStackTrace():");
  15.          ((Throwable)var3).printStackTrace();
  16.       }
  17.  
  18.    }
  19. }
  20.