home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / kaffe-0.5p4-src.tgz / tar.out / contrib / kaffe / test / compiler / Stock.java next >
Text File  |  1996-09-28  |  865b  |  31 lines

  1. import java.net.URL;
  2.  
  3. class Stock
  4. {
  5.  
  6.         public static void main(String args[]) throws Throwable
  7.         {
  8.                 System.out.println( "One" );
  9.                 getQuote( "PARQ" );
  10.                 System.out.println( "Two" );
  11.         }
  12.  
  13.         public static void getQuote( String sym ) throws Throwable
  14.         {
  15.                 URL url;
  16.  
  17.                 System.out.println( "Got here with arg " + sym );
  18.  
  19.                 try {
  20.                         url = new URL( "http://www.village.org/" );
  21.                         System.out.println( "Hi\n" );
  22.                         System.out.println( url.getContent().toString() );
  23.                         System.out.println( "Bye\n" );
  24.                 }
  25.                 catch (java.io.IOException e) {
  26.                 }
  27.                 catch (java.net.MalformedURLException e) {
  28.                 }
  29.         }
  30. }
  31.